Home > Backend Development > PHP Tutorial > 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
Release: 2023-04-08 18:46:01
forward
9260 people have browsed it

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
Copy after login
php -i | grep php.ini
Copy after login

The second type of phpinfo()

<?php echo phpinfo();?>
Copy after login

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
Copy after login

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template