我刚刚安装了PHP & Yii Framework。它工作正常,我玩CMD。但过了一段时间,我切换到PowerShell ISE。我浏览到Yii的文件夹:PowerShell问题 - 我必须输入./来运行bat文件
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窗口,它工作正常。
有没有办法来aviod打字我每次运行一个蝙蝠文件时间./?
或者只是'$ Env:Path + =';。''。 – Joey 2013-07-31 15:43:26
同意,谢谢乔伊! – 2013-08-01 01:12:46
那简单而好看 – 2017-10-13 13:04:27