What is YII?

YII means – Yes It Is. You can use yii framework for all scale of web programs, from medium to large scale. Yii was introduced in PHP in 2008 by Qiang Xue. And from then it has been continuously developed by the community. It is an open source framework. Main features of yii are 1. Fast 2. Secure 3. Professional. I think we all php programmers need these three things of speed, security and professionalism.  Yii also very much easy to install/configure and maintain. It is well documented and has very helpful community to help. So new users may not think himself helpless. There are lot video tutorials on youtube, many tutorial web sites for this framework. There also many books on this framework. You can buy books from Nilkhet, Dhaka. “The Definitive Guide to Yii 1.1” is a good book written by Qinag Xue himself is very much popular among the yii developers. You can buy this book from Dhaka.

Anyway, before closing this article I will tell you how to install yii very easily. No beginner should go to try install cakephp or zend framework before learning codeigniter or yii or any other easy framework. This is totally my personal point of view. Ok guys lets start to install yii.

  1. Go to http://www.yiiframework.com/
    YII Website
  2. You will see Download yii option just beside Take The Tour option. Current version is 1.1.14
  3. Download and extract it in your directory.
  4. If you download the zip file out side of your web directory then copy it to your web directory. If you use wampp then it will www and if it is xampp it will be htdocs. Rename the extracted yii folder to yii or any other name you like.
  5. In you yii folder you will find 4 folders named- demos, framework, projects and requirements. Out of which framework and requirements are most important.PHP YII Folder Structure
  1. You need to add your php path directory and yii->framework directory like – my computer>properties>advanced system settings>environment variables>path> edit. Please do not forget to add ; (semicolon) after your php path yii->framework path directory.
    PHP YII Path Directory7. Now you have see whether your computer system meets the requirements of yii. This is not anything difficult. Just go to your web browser and type localhost/yii/requirements and enter.

  2. If everything is ok you will see most of the requirements are passed. So your system is fit to run yii.
    YII Requirements Checker8. Now run CMD

  3. Enter to your web directory. It will be like C:\xampp\htdocs>

RUN PHP YII in Command Format10. Now type yiic webapp testyii . It will now look like C:\xampp\htdocs> yiic webapp testyii  . Here testyii is just your website or project name. You can give any name instead of testyii. It will ask you whether to create the web application or not. Write Yes and press enter. You will see a message saying – your application has been created successfully under C:\xampp\htdocs\testyii

11. If you go to your htdocs/www folder you will see that one folder has been crated with the name testyii.
PHP YII Complete Installation

12. Finally go to your web browser and just type localhost/testyii  , you will see the welcome to my web application.
YII Final Output

Is it so tough ?  Have fun.


Leave a Reply