Home>Article>Backend Development> View the location of the PHP configuration file php.ini under Linux

View the location of the PHP configuration file php.ini under Linux

hzc
hzc forward
2020-06-06 17:45:24 9146browse

Linux View the location of the PHP configuration file php.ini

The first command to view

This method requires PHP to configure environment variables, or complete the PHP path . This way you can view the configuration file information of PHP in CLI mode.

php --ini
php -i | grep php.ini

The second type of phpinfo()

If your web page can access the website, you can print the phpinfo information.

View the location of the PHP configuration file php.ini under Linux

The third type of global search

When you are unable to determine the previous two, you can try this method, but this method may The search yields many results and needs to be filtered.

find / -name php.ini

Recommended tutorial: "php tutorial"

The above is the detailed content of View the location of the PHP configuration file php.ini under Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete