文章分类 -  yii

yii setState
摘要:http://www.yiiframework.com/forum/index.php/topic/29597-yii-user-setstate-getstate/ 阅读全文
posted @ 2016-06-27 16:09 阿卡贝拉 阅读(126) 评论(0) 推荐(0)
Yii如何实现前后台的session分离
摘要:From: http://www.cnblogs.com/davidhhuan/archive/2013/05/04/3060425.html Yii Framework实现前后台frontend,backend分离的方法有几种,总结如下: 1. 分开入口文件 目录结构 网站正常的入口文件是inde 阅读全文
posted @ 2016-06-10 16:30 阿卡贝拉 阅读(283) 评论(0) 推荐(0)
yii:zip
摘要:from:http://www.koofun.com/showcode.html?id=36446 from:http://yiibook.blogspot.com/2012/05/create-zip-file-in-yii.html from:http://www.yiifans.com/por 阅读全文
posted @ 2016-05-30 17:53 阿卡贝拉 阅读(120) 评论(0) 推荐(0)
yii :$this->findAll( $criteria )
摘要:down vote Try: $id =101; $comments = EmailArchive::model()->findAll( array("condition"=>"email_id = $id","order"=>"id")); OR $id =101; $criteria = new 阅读全文
posted @ 2016-05-27 10:30 阿卡贝拉 阅读(224) 评论(0) 推荐(0)
get current Controller who owns the action
摘要:echo Yii::app()->controller->getId; echo Yii:app()->getController->id; echo Yii:app()->controller->uniqueID; 阅读全文
posted @ 2016-05-24 11:42 阿卡贝拉 阅读(81) 评论(0) 推荐(0)
countByAttributes
摘要:$users[$uid] = UserModel\User::model()->countByAttributes( array( 'upuid' => $uid ), 'status != :status', array( ':status' => 2 ) ); 阅读全文
posted @ 2016-02-19 18:30 阿卡贝拉 阅读(83) 评论(0) 推荐(0)
局部关闭CSRF
摘要:From:https://segmentfault.com/a/1190000002474925public function beforeAction($action) { if (parent::beforeAction($action)) { if (... 阅读全文
posted @ 2016-01-18 21:45 阿卡贝拉 阅读(333) 评论(0) 推荐(0)
yii2组件
摘要:You can also make components in YII2Create a directory and a file same as in YII1 in frontend or backend and write below code in itfrontend/compon... 阅读全文
posted @ 2016-01-17 15:21 阿卡贝拉 阅读(199) 评论(0) 推荐(0)
YII一些网址
摘要:数据库操作1 http://www.yii-china.com/post/detail/7.html 数据库操作2 http://www.yii-china.com/post/detail/8.html 数据库操作3 http://www.yii-china.com/post/detail/24.h 阅读全文
posted @ 2016-01-17 13:12 阿卡贝拉 阅读(131) 评论(0) 推荐(0)
别名定义问题
摘要:来源于stackoverflow1.In config folder create file aliases.php. And put this:Yii::setAlias('webroot', dirname(dirname(__DIR__)) . '/web'); Yii::setAlias('... 阅读全文
posted @ 2015-12-12 20:54 阿卡贝拉 阅读(144) 评论(0) 推荐(0)