Home >Backend Development >PHP Problem >How to modify environment variables in php
php method to modify environment variables: 1. Find the XAMPP file path and set the environment variable to "D:\xampp\php"; 2. Configure to the scripts path; 3. Enter the command "in cmd" php -v" to see if the configuration is successful.
Recommended: "PHP Tutorial"
PHP Setting Environment Variables
1. The php.exe file is used to execute PHP files. Set directly to the parent directory of php.exe.
For example, my XAMPP file path is: D:\xampp\php\php.exe, then the environment variable is set to
D:\xampp\php
2, and configured to the scripts path for execution in cmd PHP method for your own project.
For example, my XAMPP file path is: D:\xampp\php\scripts, then the environment variable is set to
D:\xampp\php\scripts
3. Enter the command in cmd: php -v to check whether the configuration is successful.
The above is the detailed content of How to modify environment variables in php. For more information, please follow other related articles on the PHP Chinese website!