Skip to main content

Posts

Showing posts with the label Yii Application

Installing Yii and creating Your fisrt Yii application

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 databa...

Yii PHP Framework Basics

yii workflow A user makes a request with the URL http://www.example.com/index.php?r=post/show&id=1 The bootstrap script creates an application instance and runs it.  The application obtains the detailed user request information from an application      component named request. The application determines the requested controller and action with the help of an application component named urlManager.  The application creates an instance of the requested controller to further handle theuser request. The action reads a Post model whose ID is 1 from the database. The action renders a view named show with the Post model. The view reads and displays the attributes of the Post model. The view executes some widgets The view rendering result is embedded in a layout Widget Widget is an instance of the CWidget 1. <?php $this->beginWidget('path.to.WidgetClass'); ?> ...body content that may be captured by the widget... <?php $this->endW...