Home >Backend Development >PHP Problem >php is not recognized as an internal or external command

php is not recognized as an internal or external command

(*-*)浩
(*-*)浩Original
2019-10-11 11:45:226214browse

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)

php is not recognized as an internal or external command

The reason is very simple, there is no PHP environment variable configured

1: Check the currently used PHP version

php is not recognized as an internal or external command

2. Open the php file, find the configuration file of the currently used version, and copy its path

php is not recognized as an internal or external command

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

php is not recognized as an internal or external command

php is not recognized as an internal or external command

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!

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