Win7 PHP environment variable setting method: first download the package; then find "php.ini-development" and modify it to "php.ini"; finally add PHP environment variables in the "Environment Variables" of win7 That’s it.
Recommended: "PHP Video Tutorial"
1: Download the program package
First go to the php official website to download the program package, the official website address: http://www.php.net/downloads.php
2: Unzip
Unzip Put your program package in a directory other than the c drive (the folder is not named in Chinese)
3: Modify the php installation package file
In the php root directory Find "php.ini-development" and modify it to: "php.ini"
Find in php.ini (the following is not set by yourself)
Find the following statements and change these statements Remove the ";" in front:
The code is as follows:
;extension=php_gd2.dll ;extension=php_mysql.dll ;extension=php_sockets.dll
Find the following two sentences:
The code is as follows:
;On windows: ;extension_dir = "ext"
Change the last sentence above to (note removing the semicolon in front):
The code is as follows:
extension_dir = "D:\php-5.5.7\ext" //你存放php的目录
Four: Add bad Environment variables
The environment variable settings managed by win7 are similar to those of xp. Right-click [Computer]--[Properties]--[Advanced System Settings] and then select [Advanced]--[ Environment variables】
5: Detect php version number
The above is the detailed content of How to set environment variables in win7 php. For more information, please follow other related articles on the PHP Chinese website!