Introduction To YII Framework PHP Script


Introduction To YII Framework PHP Script

There are lot of PHP framework available these days. I this tutorial I am going to introduce YII framework which is one of the popular php framework. YII is a component base php framework that is used to build large scale web application since it is known to be one of the high performance php frameworks available today. Yii is simple to learn and contained richest fractures make high complex web applications

Requirement

1 php 5.10 or higer
2 knowledge of object oriented programming in php (MVC design pattern )

Installation

1 . First you need to download files from yii framework web site
2 . Then unzip yii folder and copy to your web server www directory

After you copied file navigate to yii/requirements/index.php through you browser. This link will be listed all the requirement you need to have run yii application.

How create a web application.

After you have successfully installed yii in your web server, you can use YIIC ( YII framework command line tool ) tool to create new web application . It is very easy to create initial web application using yii tool which provides all the needed file and initial configuration to web application
Command that I used to create my xdata application is as follows

 

 

    C:\wamp\www\ - > framework/yiic  xdata  c:\wamp/www/testdrive

 

framework/yiic = path to my yiic tool
xdata = my application name
c:\wamp/www/testdrive = where I want to create application

If you are able to run the command successfully you can see the our xdata application has been created on web server with all wanted files and structure to run initial web application.

How to connect to database

Go to the xdata/protected/config/main.php and find the db array and placed the data base configuration in to code line that describe as DB. Xdata example as follows

 

 

    'db'=>array(
    'connectionString' => 'mysql:host=localhost;dbname=sence_data',
    'emulatePrepare' => true,
    'username' => 'root',
    'password' => '',
    'charset' => 'utf8',
    ),

 

Crating a crude operation

Creating a crude operation in yii is very easy. Yii has code generation tool called gii which can be used to created all crude operation you need. To configure gii you need to give a user name and password to gii code section of config.php file. My xdata application gii configuration as follows.

 

 

    'gii'=>array(
    'class'=>'system.gii.GiiModule',
    'password'=>'abc',
    // If removed, Gii defaults to localhost only. Edit carefully to taste.
    'ipFilters'=>array('127.0.0.1','::1'),
    ),

 

 

Using gii tool you can create all the crude operation and needed file structure to run higly capable aof application in a very short time. Please refer yii documentation for more details of gii

 

 

Learn How to install Introduction To YII Framework PHP Script?



Find More related Introduction To YII Framework PHP Script



Introduction PHP Script | To PHP Script | Yii PHP Script | Framework PHP Script | Php PHP Script | Script PHP Script | There PHP Script | Lot PHP Script | Of PHP Script | Php PHP Script | Framework PHP Script | available PHP Script | These PHP Script | Days PHP Script | I PHP Script | Th PHP Script | Tutorial PHP Script | I PHP Script | Am PHP Script | Going PHP Script | To PHP Script | Introduce PHP Script | Yii PHP Script | Framework PHP Script | Which PHP Script | One PHP Script | Of PHP Script | The PHP Script | Popular PHP Script | 2021 Top 100 Introduction PHP Script | Top 10 To PHP Script | Top 50 Yii PHP Script | 2021 Top 40 Framework PHP Script | Top 100 Php PHP Script | Top 50 Script PHP Script | 2021 Top 100 There PHP Script | Top 100 Lot PHP Script | Top 10 Of PHP Script | Top 100 Php PHP Script | Top 200 Framework PHP Script | Top 500 available PHP Script | Top 1000 These PHP Script | Top 5000 Days PHP Script | Top 50 I PHP Script | Top 50 Th PHP Script | Top 50 Tutorial PHP Script | Top 50 I PHP Script | Top 50 Am PHP Script | 2021 Top 50 Going PHP Script | Top 50 To PHP Script | Top 50 Introduce PHP Script | Top 50 Yii PHP Script | Top 50 Framework PHP Script | Top 20 Which PHP Script | Top 20 One PHP Script | Top 20 Of PHP Script | Top 10 The PHP Script | Top 10 Popular PHP Script | Popular 100 Introduction PHP Script | Popular 10 To PHP Script | Popular 50 Yii PHP Script | Popular 40 Framework PHP Script | Popular 100 Php PHP Script | Popular 50 Script PHP Script | Popular 100 There PHP Script | Best 100 Lot PHP Script | Best 10 Of PHP Script | Best 100 Php PHP Script | Best 200 Framework PHP Script | Best 500 available PHP Script | Best 1000 These PHP Script | Best 5000 Days PHP Script | Popular 50 I PHP Script | 2021 New 50 Th PHP Script | 2021 New 500 Tutorial PHP Script | 2021 New 1000 I PHP Script | 2021 Top 500 Am PHP Script | 2021 Best 500 Going PHP Script | 2021 New 10 To PHP Script | 2021 Popular 500 Introduce PHP Script | 2021 Popular 20 Yii PHP Script | 2021 New 1050 Framework PHP Script | 2021 Top 200 Which PHP Script | 2021 Top 4000 One PHP Script | 2021 New 20 Of PHP Script | 2021 Best 100 The PHP Script | 2021 Best 120 Popular PHP Script |

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *

Horje

Horje