开发者

executing shell from command in Yii

开发者 https://www.devze.com 2023-03-08 17:39 出处:网络
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.

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

executing shell from command in Yii

Yiic Inside Framework

executing shell from command in Yii


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

0

精彩评论

暂无评论...
验证码 换一张
取 消