Home >Backend Development >PHP Problem >How to install php7 under windows?

How to install php7 under windows?

青灯夜游
青灯夜游Original
2020-11-06 15:51:354193browse

Installation method: 1. Download the appropriate php7 installation package from the official website, then unzip it and rename the folder to "php7"; 2. Open the php7 folder, find the "php.ini-development" file, and rename it. Name it "php.ini"; 3. Configure the php.ini file; 4. Add PHP environment variables.

How to install php7 under windows?

Recommended: "PHP Video Tutorial"

How to install php7 under windows

1. Download PHP7

#1), first open the official website and download the appropriate php7 installation package

If the computer is windows If the system is 64-bit, select the "VC14 x64 Thread Safe" zip package to download

How to install php7 under windows?

#2). After downloading, unzip the compressed package to the name "php7 "In the folder of Open the php7 folder and find the configuration file. Generally, there are two default files: one is "php.ini-development" for the development environment, and the other is "php.ini-production" for the production environment

How to install php7 under windows?

2) Just change the name of any configuration file to "php.ini".

3) Open the configuration file and find extension_dir on line 738. Change extension_dir="ext" to your installation path and add ext, such as "d:/php7 /ext”

How to install php7 under windows?

4), open the extension, find the extension you want to activate, remove the “;” in front of the extension, How to install php7 under windows?

How to install php7 under windows?3. Add PHP environment variables

Finally, we need to let Windows know where to find our PHP installation.

We can take the following steps:How to install php7 under windows?

a. Open the

Control Panel->System and Security

Settings->

System

b. Click

Advanced System Settingsc. Click the Environment Variables button

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

and click the Edit button

e. In the new pop-up window, click the New button and add " The installation path of PHP7 "

f. Click OK, OK, OK. The PHP environment variable has now been addedFinally 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:

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.

Create a new test file in the web server and add a method to view the PHP configuration information in the file. If running the file displays the version of PHP installed, the installation is successful

f9f863832998a29179c21004e742b7How to install php7 under windows?


For more programming-related knowledge, please visit:

Introduction to Programming

! !

The above is the detailed content of How to install php7 under 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