Home>Article>Backend Development> Detailed explanation of PHP7 environment configuration in windows7
Currently PHP has reached 7, but the configuration of version 7 is different from the previous 5. Today I will record the environment configuration of 7
Related learning recommendations:PHP Programming from beginner to master
1.apache configuration
You can download the corresponding version according to your own platform, download address: https ://www.apachehaus.com/cgi-bin/download.plx
After downloading, unzip a folder and use the editor Open the httpd.conf file in the conf directory and make the following modifications
When setting the address of the root directory above, it is the root directory address of apache
One of the two addresses above is the root directory address of php, and the other is the directory of the dll extension.Note: The relative path here is relative to the above
of the SRVROOT address. If the port is occupied, you can modify it to change the port number:
Configure the default home page as follows:
Now that the apache configuration is complete, you can use cmd to create the apache service. The command is as follows:
If it doesn’t work here, you can see if you have installed the extensions required for vc14. Download address: https://www.microsoft .com/en-US/download/details.aspx?id=48145
2. Configure PHP
Download php, address: http://php.net/downloads.php, choose the appropriate version to download, then unzip it and put it in the same directory as apache, change the php.ini-development file in the directory to the php.ini file And make the following modifications:
#Enable related extensions :
#If all the above are installed successfully, this We can first open apache, and then create a new test.php file under htdocs in the apache directory, with the following content:
Then enter the URL in the browser to see the effect. Pay attention to your port number. If it is 80, you don’t need to write it. Others must be written:
# to this php environment The configuration is done, let’s start quickly!
The above is the detailed content of Detailed explanation of PHP7 environment configuration in windows7. For more information, please follow other related articles on the PHP Chinese website!