executing shell from command in Yii
The book I'm using to learn Yii, is telling me that we're going to use the yiic shell command to invoke other commands.
To use yiic shell, it's telling me
cd /Webroot/demo
So I moved into my demo folder, which is inside htdocs on my MAMP setup. See first image below.
It is then telling me, from withi开发者_开发知识库n my demo folder, to execute this
YiiRoot/framework/yiic shell
where it defines the YiiRoot
as "the folder where I have installed Yii". In my set up, I believe YiiRoot is htdocs. See image 2 below.
so, from within demo folder, I tried running
htdocs/framework/yiic shell
and also
/htdocs/framework/yiic shell
but in both cases I get "no such file or directory"
Any idea what I'm doing wrong?
Demo and Framework inside htdocs
Yiic Inside Framework
For linux-like filesystem. Run next commands
cd /htdocs/demo/
./protected/yiic shell index.php
Please notice that probably your also need to set execution permission for yiic file
chmod +x /htdocs/demo/protected/yiic
It didn't work because the shell has been deprecated and it needs to be done with Gii
精彩评论