phpyiiyii2yii2-basic-appyui-compressor

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


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!


Solution

  • 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.