Home  >  Article  >  Backend Development  >  How does PHP find the php.ini configuration file?

How does PHP find the php.ini configuration file?

青灯夜游
青灯夜游Original
2019-05-20 10:45:4518935browse

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.

How does PHP find the php.ini configuration file?

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:

<?php
phpinfo();

How does PHP find the php.ini configuration file?

Save the above content and view the output information in the browser

How does PHP find the php.ini configuration file?

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

How does PHP find the php.ini configuration file?

2. Use the cmd window

to open the cmd window and enter: php -i | findstr php.ini

How does PHP find the php.ini configuration file?

Press return After the car key is executed, you can also get the path of the php.ini configuration file

How does PHP find 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!

Statement:
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