- Prior to installing Yii, you must configure your application development environment as a web server capable of supporting PHP 5.1.0 or higher.
- The basic Yii installation is almost trivial. There are really only two necessary steps:
1. Download the Yii Framework from http://www.yiiframework.com/download/.
2. Unpack the downloaded file to a web-accessible folder.
- Verify that your server satisfies all of the requirements for using Yii and to ensure the installation was a success Yii comes with a simple requirement checking tool.
- To invoke the tool and have it verify the requirements for your installation, simply point your browser to: http://yourhostname/path/to/yii/requirements/index.php . You should see a screen similar to the one below
- Installing a database.
Though you can use any database that is supported by PHP with Yii, if you want to use some of built-in database abstraction layers and tools within Yii, you will need to use one that is supported by the framework. As of version 1.1, those are:
• MySQL 4.1 or later
• PostgresSQL 7.3 or later
• SQLite 2 and 3
• Microsoft SQL Server 2000 or later
• Oracle
- Creating a new application
From your command line, change current directory to your framework folder and execute
the following:
yiic webapp WebRoot/your_app_name
or other variations of the yiic command depending on your operating system e.g '.\yiic' .
the message below will appear:
Create a Web application under '/Webroot/your_app_name'? [Yes|No]
type :
yes
- You are done! Without writing a single line of code, we can test drive our first Yii application by accessing the following URL in a Web browser:
http://hostname/your_app_name/index.php
Comments
Post a Comment