Properties->Advanced System Settings->Environment Variables"; then create a new environment variable PHPRC; finally restart phpserver and you will see that the loading path of "php.ini" has changed.">
How to modify the path of php.ini: First click "Computer->Properties->Advanced System Settings->Environment Variables"; then create a new environment variable PHPRC; finally restart phpserver and you will see "php .ini" changes.
Modify the configuration path of php.ini under win7
By directly decompressing the downloaded zip package under win7 PHP is installed. At this time, the installation path and configuration file path of PHP are not set in the environment variables. The default loading path of the configuration file is the C:\Windows directory. At this time, there is no configuration file, so there is no configuration file. At this time There is no way to configure php. You need to manually move the php.ini file to the C:\Windows directory.
If you don’t want to move it to the C:\Windows directory, here is another way to set the path of php.ini to the php installation path and add environment variables.
Computer->Properties->Advanced System Settings->Environment Variables
Create a new environment variable PHPRC, pointing to the PHP installation path. As shown in the picture below, my php was decompressed to the D drive, so the environment variable is D:\php5.
After this setting is completed, you can restart phpserver (apache2, etc.). You can see that the loading path of php.ini changes, and the configuration of php.ini also takes effect.
The php.ini configuration file does not exist in the php installation directory by default. You need to change php.ini-development to php.ini.
For more related knowledge, please visitPHP Chinese website!
The above is the detailed content of How to modify the configuration path of php.ini. For more information, please follow other related articles on the PHP Chinese website!