共26页: 首页 上一页 17 18 19 20 21 22 23 24 25 下一页 末页 
摘要: 假设数据库的设置已经弄好了,里面的有一个User表建立User模型model User建立User的CRUD行为crud User创建 Modulemodule forum阅读全文
posted @ 2010-04-21 11:54 DavidHHuan 阅读(414) 评论(0) 编辑
摘要: 把/media/MyDocuments/xampp/htdocs/myyii下面的index.php复制到/media/MyDocuments/xampp/htdocs/myyii/protected下面,然后将下面的代码$yii=dirname(__FILE__).'/framework/yii.php';$config=dirname(__FILE__).'/protected/config/...阅读全文
posted @ 2010-04-21 11:54 DavidHHuan 阅读(267) 评论(0) 编辑
摘要: 创建应用,假设yii的核心文件夹framework是放在/media/MyDocuments/xampp/htdocs/myyiicd /media/MyDocuments/xampp/htdocs/myyiiphp framework/yiic.php webapp /media/MyDocuments/xampp/htdocs/myyii阅读全文
posted @ 2010-04-21 11:54 DavidHHuan 阅读(281) 评论(0) 编辑
摘要: <?php return array( 'class'=>'CUrlManager', 'urlFormat'=>'path', 'urlSuffix'=>'.html', 'showScriptName'=>false, 'caseSensitive'=>false,//it makes route case-insensitive. 'rules'=>...阅读全文
posted @ 2010-04-21 11:53 DavidHHuan 阅读(420) 评论(0) 编辑
摘要: mysql:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->'db'=>array('connectionString'=>'mysql:host=localhost;dbname=tsmp','username'=>'root','password'=>'1','charset'=>'utf8', 'tablePrefix'=>'tbl_',//'schemaCachingDuration'=>3600,//如果在main.php里面设置了c阅读全文
posted @ 2010-04-21 11:53 DavidHHuan 阅读(489) 评论(0) 编辑
摘要: public function filters(){ return array( ’postOnly + edit, create’, array( ’application.filters.PerformanceFilter - edit, create’, ’unit’=>’second’, ...阅读全文
posted @ 2010-04-21 11:52 DavidHHuan 阅读(293) 评论(0) 编辑
摘要: 创建[代码]调用[代码]阅读全文
posted @ 2010-04-21 11:52 DavidHHuan 阅读(725) 评论(10) 编辑
摘要: main.php文件'modules' => array( 'admin' => require(dirname(__FILE__).DIRECTORY_SEPARATOR.'backend.php') )backend.php文件<?phpreturn array( //'sizePerPage' => 10, 'defaultController'=>'user'...阅读全文
posted @ 2010-04-21 11:52 DavidHHuan 阅读(651) 评论(0) 编辑
摘要: class MyWidget extends CWidget{public function init(){// this method is called by CController::beginWidget()}public function run(){// this method is called by CController::endWidget()}}通常,widget的视图是是放...阅读全文
posted @ 2010-04-21 11:51 DavidHHuan 阅读(449) 评论(0) 编辑
摘要: $this->widget('CMaskedTextField',array('mask'=>'99/99/9999'));阅读全文
posted @ 2010-04-21 11:51 DavidHHuan 阅读(329) 评论(0) 编辑
摘要: Ajax请求页面块的时候,是不希望加载layout的,这时候怎么向页面块传递参数呢?可以使用renderPartial()来代替render()阅读全文
posted @ 2010-04-21 11:51 DavidHHuan 阅读(490) 评论(0) 编辑
摘要: system: Yii framework directoryapplication: application's base directorywebroot: the directory containing the entry script fileext: directory of extensions阅读全文
posted @ 2010-04-21 11:50 DavidHHuan 阅读(205) 评论(0) 编辑
摘要: 以on开关定义方法,如要clicked事件,public function onClicked($event){$this->raiseEvent('onClicked', $event);}调用的时候$component->onClicked=$callback;如果$callback是一个全局对象里面的方法,要用以下array($object, 'methodName')方法应该定...阅读全文
posted @ 2010-04-21 11:50 DavidHHuan 阅读(229) 评论(0) 编辑
摘要: 例如,要存储timestamp的值是用MySQL now()函数,这时候可以这样,$post = new Post;$post->createTime=new CdbExpression('NOW()');//$post->createTime='NOW()';will not work because 'NOW()' will be treated as a string$post-...阅读全文
posted @ 2010-04-21 11:49 DavidHHuan 阅读(397) 评论(0) 编辑
摘要: public function ValidatorName($attribute,$params) f ... G阅读全文
posted @ 2010-04-21 11:49 DavidHHuan 阅读(184) 评论(0) 编辑
共26页: 首页 上一页 17 18 19 20 21 22 23 24 25 下一页 末页