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

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

Jun 02, 2016 am 09:14 AM

文章给各位简单的介绍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了.


                               


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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)