Home > php教程 > php手册 > yiic命令时提示“php.exe”不是内部或外部命令解决办法

yiic命令时提示“php.exe”不是内部或外部命令解决办法

WBOY
Release: 2016-06-02 09:14:07
Original
985 people have browsed it

文章给各位简单的介绍yiic命令时提示"php.exe"不是内部或外部命令解决办法,希望能帮助到各位.

在CMD中运行 yiic webapp work 如果报"php.exe"不是内部命令,是这样的:原因是Yii自带的yiic.bat找不到php.exe.

解决方法:

因为没有加入环境变量,所以无法直接执行php.exe.

右击"我的电脑-》属性-》高级->环境变量-》系统变量-》PATH-》编辑",在变量值中添加以下2个执行文件,方便直接调用执行.

变量值:C:\wamps\bin\php\php5.3.8\;E:\php\PHPnow\htdocs\yii\framework\

或者:原因是 Yii 自带的yiic.bat 找不到php.exe,用文本编辑器打开yii/framework/yiic.bat修改:

if "%PHP_COMMAND%" == "" set PHP_COMMAND= php.exe

改为:if "%PHP_COMMAND%" == "" set PHP_COMMAND=D:\wamp\bin\php\php5.3.10\php.exe

然后在CMD中重新运行 yiic webapp work就ok了.


                               


source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template