Home >Backend Development >PHP Tutorial >PHP framework Yii framework prompts 'php.exe' is not an internal or external command when using the yiic command, yiiyiic_PHP tutorial
解决方案
yii/framework/yiic.bat,修改<br /><br />if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe<br />if "%PHP_COMMAND%" == "" set PHP_COMMAND=<span><strong>D:\wamp\php\php.exe<br /><br /><br /></strong></span>
关掉dos窗口 再打 输入 yiic webapp XX
It's like this: The reason is that the yiic.bat that comes with Yii cannot find php.exe.
Solution: Use notepad++ to open yii/framework/yiic.bat and modify
if "%PHP_COMMAND%" == " " set PHP_COMMAND=php.exe
→→→ if "%PHP_COMMAND%" == "" set PHP_COMMAND=D:\wamp\php\php.exe
I just changed it to
if "%PHP_COMMAND%" == "" set PHP_COMMAND=C:\wamp\bin\php\php5.4.3\php.exe
Go to
My Computer-Properties-Advanced-Environment Variables
Set PATH and add the path to your php.exe.