Home>Article>Backend Development> How does PHP find the php.ini configuration file?
php.ini is the PHP configuration file, and its role is very important. So how to find the configuration file? The following article will introduce it to you, I hope it will be helpful to you.
By searching for the address of the php.ini configuration file, you can find the file through the file address.
Method to find the address of the php.ini configuration file:
1. Use the phpinfo() function
to create a new PHP document. The purpose of this document It is the environment configuration for detecting PHP. Example:
Save the above content and view the output information in the browser
The above information is the configuration information of PHP. Look for: Loaded Configuration File on this page. The red box is the specific path of php.ini
2. Use the cmd window
to open the cmd window and enter:
php -i | findstr php.ini
Press return After the car key is executed, you can also get the path of the php.ini configuration file
The configuration file can be found through the php.ini configuration file address.
The above is the detailed content of How does PHP find the php.ini configuration file?. For more information, please follow other related articles on the PHP Chinese website!