Home  >  Article  >  Backend Development  >  How to find php installation directory files

How to find php installation directory files

藏色散人
藏色散人Original
2020-09-02 09:14:154506browse

How to find the PHP installation directory file: First use the "php -version" method to check the installed PHP version; then use the "php --ini" command to check the directory where the current PHP configuration file is located.

How to find php installation directory files

Recommended: "PHP Video Tutorial"

When we use php commands on the command line , sometimes, some errors or something will be reported.

If you have different php versions installed on your computer and you want to see the version of php that the current command is running, you can use php -version to check.

As shown above, after running php -version, it shows that my PHP version is 7.0.23.

At the same time, you can also use the php --ini command to check which directory the current php configuration file is in. This is very important. For example, if you get an error when running the php command, you do not have an extension installed. In this case, you can first check the location of php.ini through this command, and then modify the php.ini configuration file to install the extension.


As shown above, after running php --ini, my php.ini configuration file is displayed under the D:/laravel/php7/ directory. .

The above is the detailed content of How to find php installation directory files. 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