Home > Article > Backend Development > How to find php installation directory files
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.
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!