create mvc structure with existing database in yii using gii tool


php tutorial

I am totally beginners to yii framework and sharing my yii code and methods that worked for me.So yii is very easy and flexible to learn and write web application.

To start gii tool set the password for the gii in the file location

opt/lampp/htdocs/project_name/protected/config/main.php

'modules'=>array(
        // uncomment the following to enable the Gii tool

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

    ),

The gii as already testdriver.db which as default login table configured in main.php file located in

'db'=>array(
            'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
        ),

To connect gii generator to existing database the following code should be uncomment the code in the file main.php.

opt/lampp/htdocs/project_name/protected/config/main.php

        'db'=>array(             'connectionString' => 'mysql:host=localhost;dbname=mydb',           …

View original post 32 more words

Advertisements
About

myself pramodh kumar yet another php developer from India and have worked on oops,procedural,yii framework,codeigniter,wordpress,joomla,api and more.

Tagged with: , , , , , , , ,
Posted in php

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow php tutorial on WordPress.com
categories
Calendar
May 2014
M T W T F S S
« Apr   Jun »
 1234
567891011
12131415161718
19202122232425
262728293031  
Follow me on Twitter
Blog Stats
  • 74,607 hits
%d bloggers like this: