Getting Started - Simple Command LIne Question


Just a quick question here…

I’m using Windows… I can successfully use the command prompt command “webapp” to make a new app.


  1. Open cmd

  2. D:/yii/framework/yiic webapp D:/websites/testdrive makes the files

Now I want to open the shell, which seems to not work correctly

  1. Open cmd

  2. cd D:/websites/testdrive

  3. D:/yii/framework/yiic shell

This is where the problem happens… it seems to execute something…

But instead of writing "YII Interactive Tool… etc" and pausing…

it seems to generate alot of strange html and php and finish executing with no options…

any ideas?? I’m not that great and command prompting… but I think I’m doing things correctly…

Best, Bryan

NOTE: moved to proper section (General Discussion for Yii 1.1.x instead of Yii applications)

For the command line tool on your step 5 instead of "d:/yii/framework/yiic shel" issue the command "protected/yiic shell" -

But note that this way of creating models and crud is deprecated… it’s better to use Gii for this -

btw… welcome to the Yii forum :)

Many thanks… I guess I have one more question then…

Besides using command line with the verb "webapp" to make new sites, is there any other reason to use it? Or can every reasonable thing be easily accomplished through gii?

thanks a bunch for any help…

best, B

There is the possibility to develop custom command line commands and then to execute them you use "yiic".