The example in this article describes the solution to the problem that "php.exe" is not an internal or external command when using the yiic command. It is shared with everyone for your reference. The specific method is as follows:
Run yiic webapp work in CMD. If the report "php.exe" is not an internal command, it is like this: the reason is that the yiic.bat that comes with Yii cannot find php.exe.
Solution:
Because the environment variable is not added, php.exe cannot be executed directly.
Right-click "My Computer-"Properties-"Advanced-"Environment Variables-"System Variables-"PATH-"Edit" and add the following 2 executable files to the variable value to facilitate direct call execution.
Variable value: C:wampsbinphpphp5.3.8;E:phpPHPnowhtdocsyiiframework
Method 2:
The reason for this problem is that the yiic.bat that comes with Yii cannot find php.exe, so you can use a text editor to open yii/framework/yiic.bat and modify it:
Change to:
Then re-run yiic webapp work in CMD and it will be ok.
I hope this article will help you design PHP programs based on the Yii framework.