Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create webapp with yiic command using Yii Framework

Tags:

yii

I'm trying to build my first app in Yii, the guide on their website at the following address: http://www.yiiframework.com/doc/guide/1.1/he/quickstart.first-app # add-comment The problem is that any issue installing the application framework through the YIIC can not have that. I did the following: 1. I went through the CMD Library of the framework that is my WAMP server. 2. I wrote the following command: yiic.php webapp www/blog, I also tried the following command: yiic webapp www/blog.

As I understand their guide, should there be a directory called blog with a skeleton application. What actually happens is that windows opens me the window titled "Open With" asking me to choose which program I want to open the yiic.php to view the contents of the file.

like image 404
Aviway Avatar asked Dec 20 '22 15:12

Aviway


1 Answers

On windows you just go to your framework folder and type:

yiic webapp pathToYourNewProject

yiic will default to yiic.bat so you don't need to specify any php.exe (I'm not saying that it wouldn't work like that). and path to your new project can be relative or absolute, here are some examples:

-- C:
   |
   -- sandbox/
     |
     --yii/
     | |
     | --framework/
     |   |
     |   --yiic.bat (for Window)
     |   --yiic.php (for Linux)
     --newWebApp/

To create on Windows i use:

cd c:\sandbox\yii\framework
yiic webapp ../../newWebApp
type yes when prompted and you're done

or

cd c:\sandbox\yii\framework
yiic webapp c:\sandbox\newWebApp
type yes when prompted and you're done

To create on Linux:

cd /media/sf_sandbox/yii/framework/
./yiic webapp ../../newWebApp
like image 164
Marian Zburlea Avatar answered Mar 03 '23 07:03

Marian Zburlea