Home >Backend Development >PHP Problem >php is not recognized as an internal or external command
Today I was learning TP5 and an error occurred when using the command line to create a new module directory, as follows (recommended learning: PHP video tutorial)
The reason is very simple, there is no PHP environment variable configured
1: Check the currently used PHP version
2. Open the php file, find the configuration file of the currently used version, and copy its path
3 , Configure environment variables
Right-click this computer--> Properties--> Advanced system settings--> Environment variables--> Path --> Edit
Paste the path you just copied. For example, mine is: E:\myphp_www\PHPTutorial\php\php-5.4.45
Note: The path must be separated by English. Number split
4. Test
The above is the detailed content of php is not recognized as an internal or external command. For more information, please follow other related articles on the PHP Chinese website!