dsbiw2911188 2017-03-11 10:47
浏览 263
已采纳

yii2“$”不是内部或外部命令,可执行程序或批处理文件。 错误

I am trying to minimize the assets in yii2 test project, but with no result. I used this tutorial: HOW TO MINIMIZE THE ASSETS IN YII 2 FRAMEWORK

I use openserver. In assets directory I created a file named compression. In that file I put yuicompressor.jar(YUI compressor) and compiler.jar(Google Closure compiler). files screenshot

After that, I tried to create configuration file for the compressor, running this command in the openserver console(being in the project root):

$ ./yii asset/template assets/compression/config.php

But here I get the following error:

"$" Is not internal or external
Command, executable program or batch file.

Please help with this!

  • 写回答

1条回答 默认 最新

  • dongyuqi3808 2017-03-13 23:02
    关注

    This is probably a environmental variable / path problem. Try the same command with php in front, possibly without the ./. Could also be that you need to use the entire path to php, like /path/to/php yii asset/template assets/compression/config.php.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部