Introduction: This is a detailed page of yii study notes. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 333671 'rolling = 'no'>
Main reference address http://www.yiiframework.com/doc/guide/1.1/zh_cn/
Install
1 first, create a yii Application
Yiiroot/framework/yiic webapp webroot/guavayii
2. Copy the framework to the created application and change row 4th of index. php to $ yii = dirname (_ file _). '/framework/yii. php ';
$ Config = dirname (_ file _). '/protected/config/Main. php ';
3. Enter the corresponding address to access
Controller
1 copy a copy of protected \ controllers \ sitecontroller. php to guavacontroller. php
Class guavacontroller extends controller {/*** this is the default 'index' action that is invoked * when an action is not explicitly requested by users. * // related documentation http://www.yiiframework.com/doc/guide/1.1/zh_cn/basics.controllerpublic function actionindex ($ Gu) Public Function actionindex ($ Gu, $ Language = 'en ') {// $ this-> render ('index'); echo $ Gu. $ language; echo "Hello yii ";}}
Access http: // 127.0.0.1/guavayii/index. php? R = guava & gu = 1 & language = Zh. You can see 1 zhhello yii.
More articles about "yii Study Notes"
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/333671.html pageno: 11.