Yii is a high-performance PHP framework best for developing Web 2.0 applications.
Yii comes with rich features: MVC, DAO/ActiveRecord, I18N/L10N, caching, authentication and role-based access control, scaffolding, testing, etc. It can reduce your development time significantly.
Three steps to build your application rapidly:
- You create the database;
- Yii generates the base PHP code;
- You customize the code to fit your exact needs.
Source: Yii #History - Wikipedia (note: release 2.0.9 is missing from the Wikipedia article on 2016-07-29)
Installation or Setup
Setup for Yii 1.1
Step 1 - downloading Yii
Download the Yii framework bundle from the Yii website
Inside the downloaded bundle there are 3 folders, namely:
demos framework requirements
demos, as the name suggests contains a number of demo Yii applications.
framework contains the Yii framework. This is the main folder we will use for the setup
requirements contains code to check if a server meets the requirements for running Yii
framework folder to your local server. It’s recommended to keep the
framework folder in the root directory of your application. In this setup guide we will be using
localhost/yii-setup/ as our root project directory
Step 2 - the command line
Open the command line and enter the framework folder. For this example we would go to
We will now use
yiic to generate a skeleton application. We do this by entering the command:
yiic webapp path\to\root\directory
Where path/to/root/directory will be the path to your root directory, so in our example the command would be:
yiic webapp c:\wamp\www\yii-setup\
If you receive an error at this point, your command line is not configured to execute php. You will need to enable php execution from the command line to continue. Otherwise,
you will be prompted if you would like to create a new application at the entered path. Press
y and hit the return key
Your Yii skeleton application will be created under the specified path