【发布时间】:2012-01-28 16:35:52
【问题描述】:
我刚刚安装了 PHP & Yii 框架。它工作正常,我用 CMD 玩过。但过了一会儿,我切换到 PowerShell ISE。我导航到 Yii 文件夹:
cd C:\dev\yii-1.1.9.r3527\framework
我发出命令:
yiic.bat
我得到一个错误:
PS C:\dev\yii-1.1.9.r3527\framework> yiic.bat
The term 'yiic.bat' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:9
+ yiic.bat <<<<
+ CategoryInfo : ObjectNotFound: (yiic.bat:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
但是当我输入时:
./yiic.bat
进入 PowerShell 窗口,它工作正常。
有没有办法避免每次运行 bat 文件时都输入 ./?
【问题讨论】: