I am Windows 7 and use the php environment (installation path f: xampp) built with xampp to directly use the php Command globally: php.exe under xamppphp is lost to windowssystem32, but the php Command still cannot be used in the console. It must be cd to f: xamppphp. I am win7, And the php environment built with xampp (installation path f:/xampp)
To facilitate the use of php commands globally
I dropped php.exe under f:/xampp/PHP to windows/system32.
However, you still cannot use the php Command on the console. The command must be cd to f:/xampp/php.
Reply content:
I am Windows 7. I used xampp to build the php environment (installation path f:/xampp)
To facilitate the use of php commands globally
I dropped php.exe under f:/xampp/PHP to windows/system32.
However, you still cannot use the php Command on the console. The command must be cd to f:/xampp/php.
Add the PHP file PATH to the environment variable PATH.
Setx PATH "% PATH %; Your PHP folder PATH"
After the addition, when CLI and CGI run PHPPhp. ini
If it is not the same file, run the following command:
Php-I | findstr php. ini
CheckPhp. ini
File Location.
This is not directly related to the directory where php is installed. You can add the php installation path to the environment variable to access it globally on the computer.