Home >Backend Development >PHP Tutorial >How to install PHP7 on Windows?

How to install PHP7 on Windows?

藏色散人
藏色散人Original
2019-03-21 14:20:2126517browse

In this article, we will introduce you to the simple steps to install the PHP7 version on Windows. We hope it will be helpful to friends in need!

How to install PHP7 on Windows?

Recommended Manual: "php Complete Self-Study Manual"

##1. Download and install PHP7

First, you need to download the required PHP version at https://windows.php.net/download, in my example I will Download the zip file for

PHP7.2

How to install PHP7 on Windows?

After downloading, unzip the file and store the contents in a new folder located in C:\PHP7.

Before proceeding to the next step, you also need to install another dependency, Visual C Redistributable. This download link is on the same page, it is located in the left column, see screenshot below.

How to install PHP7 on Windows?

In most cases, the Visual C Redistributable 2015 version will work fine. It's a very small file, so it downloads and installs very quickly.

2. Rename the PHP.ini file

Next, we need to open the PHP folder located in c:\PHP7 and find the file named

php. ini-development file and rename it to php.ini

3. Add the PHP environment variable

Finally, we need to let Windows know where Our PHP installation can be found here.

We can take the following steps:

a. Open the

Control Panel->System and SecuritySettings->System

b. Click

Advanced System Settings

c. Click the

Environment Variables button

d.In# Select the path variable under ##System Variables

and click the Edit buttone. In the new pop-up window, click the

New

button and add " C:\PHP7"f. Click OK, OK, OK. The PHP environment variable has now been added

Finally to confirm whether PHP is successfully installed on your computer, please open the command prompt and enter Powershell:

> powershell

Now that we are in Powershell, we can pass Run the following command to check whether PHP is installed:

> php -v

You will see the following output:

How to install PHP7 on Windows?Note: To start the PHP server in the current directory, you can Run the following command:

> php -S localhost:8000

Now you can visit localhost:8000 in your browser to serve any .php file in that directory.

Recommended related articles:
1.How to install and configure PHP?
2.Recommended 6 best php environment building tools
3.The most detailed linux installation php process
Related Video recommendation:
1.Dugu Jiujian(4)_PHP video tutorial

Related recommendations: "
PHP Tutorial

"This article is about the steps and methods of installing PHP7.x version on Windows. I hope it will be helpful to friends in need!

The above is the detailed content of How to install PHP7 on Windows?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn