Php. the INI file is a configuration file of php. If you have not modified the configuration file of php on a windows host. the INI file must be in the same directory as your php installation directory, but it seems to be different in linux. Next I will introduce how to find php. ini location method. In linux
The most likely location is the/etc directory or the/usr/local/lib directory.
If you still cannot find the location, use the ultimate solution:
Create a PHP file and write the following code: Save the file, visit the page in the browser, and search for php. ini. Congratulations, the location of the php. ini file you are looking for has been found. (Using this method to find the location of the Php. ini file is a rare trick in linux and windows)
Use the command line/data/php/bin/php a. php | grep php. ini on the linux Server
Display
Configuration File (php.ini) Path => /data/php/etcLoaded Configuration File => /data/php/bin/php.ini
/Data/php/bin/php. ini permission: nginx + php is used on the linux server.
-Rwxrwxrwx. 1 root 69737 February 3 13:49/data/php/bin/php. ini
What should I do to view a. php display Loaded Configuration File>/data/php/bin/php. ini in the browser?
What is the main difference between running php commands and browsing php files in a browser?
The Php. ini location can be modified as follows:
Php. by default, the INI file is placed on/usr/local/lib. You can use the -- with-config-file-path parameter during compilation to modify php. ini storage location. For example, you can use -- with-config-file-path =/etc to store it under/etc, and then copy php from the source package. ini-dist to/etc/php. ini.
Windows
In the php installation folder.
There are two similar methods: php. ini-xxxxxxxx. You can use this method to delete "-xxxxxxxxx.