Yii Archives

1. Download Yii from following url: http://www.yiiframework.com/download/

2. Copy yii folder to your c: drive

2. Click Start Menu->Run and type cmd and enter.

3.  In the command prompt type c:\yii\framework and enter

4. Open yii.bat file in a text editor, and add following line just below the ” set PHP_COMMAND=php.exe ”

cd C:\xampp\php\

5. From the command prompt, type following command and enter

C:\yii\framework>yiic webapp <path to your webapp folder inside htdocs>

C:\yii\framework>yiic webapp c:\xampp\htdocs\<your application folder>

It will ask for permission to create web application file in your application folder, type “yes” and enter.

6. Open browser and enter url like following:

http://localhost/<your web app folder>

That’s it!

Creating a CRUD using Yii Framework

Open /protected/config/main.php

uncomment the following to enable the Gii tool:

Next you have to create a databse in mysql for your application and a table:

In my case it is db_sch_library, and table is books. The structure is given below:

Then you have to call the gii using browser like following:

http://localhost/sch_library/index.php?r=gii

Then it will ask for gii password, enter password

Then you will get a code generator page with following options:

1. Controller Generator
2. Crud Generator
3. Form Generator
4. Model Generator
5. Module Generator

Click on the like Model Generator

In the model generator page, you have to enter Table Name. The Model class will come automatically in the Model Class

text box. Click on Preview button. Then it will show the code file and Generate Button. Click on Generate button.

Then click on link Crud Generator, and it will ask for the Model Class name and Controller ID. Enter the Model name which

you have created earlier.The controller id will come automalically. Click on Preview button to preview the code files and

after that Click on Generate Button.
Then there will be a link “try it now”to see the result or you can browse like this:

http://localhost/<web_app_dir>/index.php?r=books

That’s it

Incoming search terms:

  • crud android mysql framework
  • crud en yiic mysql
  • ios crud generator

To enable urls in path format in Yii framework

Open <your_web_app_dir>/protected/config/main.php, uncomment following lines:

That’s it.

Download Yii framework (http://www.yiiframework.com), unpack it and copy it to the root folder(c:)

//htdocs folder(if your are using xampp) or your web folder.

Start->Run->cmd and cd to c:\yii\framework folder.

Next, you have to run yiic command to create your web application

The syntax for using yiic command is:

yiic webapp <path_to_webroot>/<your_web_app_directory>

In my case, it is:

c:\yii\framework>yiic webapp c:\xampp\htdocs\team_schogini

When you execute the above command, it will ask following question:

Create a Web application under ‘C:\xampp\htdocs\team_schogini’? [Yes|No]

Here you have to type Yes and press enter. Then it will create your web application directory and generate all the required files.

Now you can browse like following:

http://localhost/team_schogini/

 

Yii – A high performance PHP framework

Yii is a high performance component based Rapid Application Development PHP framework for developing large-scale Web application. The name Yii stands for easy, efficient and extensible. Yii is a pure Object Oriented Programming framework.

Requirements:- You need a PHP 5.1.0 supporting web server.

Areas of application:- Web portals, forums, e-commerce, content management system, etc.

Yii Installation:-  Download Yii framework from http://www.yiiframework.com/

Unzip and put the yii folder to the web accessible directory. If you are using xampp, you can put the yii folder inside htdocs.

After installing Yii, you can use following url to verify that your server satisfies all the requirements of Yii,

http://hostname/<path to yii folder>/requirements/index.php

 

 

 

 

Incoming search terms:

  • framework e-commerce arduino