Recently, some bloggers asked in which directory php.ini exists? Or why does it not take effect after modifying php.ini? Based on the above two questions, I think it is necessary to teach bloggers who are new to PHP how to find the path directory where PHP calls php.ini.
Generally, there are two platforms for installing PHP, the Linux environment and the WIN platform. Most of them are on WIN platform, because now the package installation packages are very convenient, such as appserv, wamp one-piece installation package, etc. There is also a one-click installation package for LNMP under Linux, which is very convenient. Since these installations have been simplified, many bloggers are not sure which directory the php.ini is placed in after the environment is installed, or they find the php.ini file in a certain directory but do not know whether it is called by a PHP program. of that.
We can find the php.ini path through phpinfo
Create a new php page and enter:
[code]
[code]
Save and exit
Use a browser to access the page, and you will see a page related to PHP configuration information
Find the line Configuration File (php.ini) Path
The value on the right /usr/local/webserver/php/etc is the directory where the php.ini file is located
After the final modification, remember to restart the relevant program to take effect.