原因是 Yii 自带的yiic.bat 找不到php.exe.
解决方法: 用notepad++打开yii/framework/yiic.bat,修改
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
→→→ if "%PHP_COMMAND%" == "" set PHP_COMMAND=D:\wamp\php\php.exe
我的就是修改为
if "%PHP_COMMAND%" == "" set PHP_COMMAND=C:\wamp\bin\php\php5.4.3\php.exe