
yii
文章平均质量分 80
fishermanmax
这个作者很懒,什么都没留下…
展开
-
top list的使用
融合导航和显示数据页面。载入数据页面:原创 2016-03-09 21:49:28 · 2620 阅读 · 0 评论 -
Yii createCommand CURD操作+个人总结
打开跟踪log的方法,config/main.php中 log routes 中添加[ 'class' => 'CWebLogRoute',]所以为了效率,为了 DB 服务器的性能考虑,还是使用 createCommand 的好。insert$row = Yii::app()->getDb()->createCommand()->insert('goods',转载 2016-03-11 21:59:02 · 539 阅读 · 0 评论 -
PHP Undefined index报错的修复方法
用$_GET["xx"]这种形式取得数据时,如果之前不加判断,$_GET["xx"]不存在时会出现这样的警告:PHP Notice: undefined index xxx。虽然可以通过设置错误显示方式来隐藏这个提示,但是这样也有隐患,就是在服务器的日志中会记录这些提示,导致日志文件异常庞大。首先,这个不是错误,是warning。所以如果服务器不能改,每个变量使用前应当先定义。网上转载 2016-03-13 18:28:34 · 528 阅读 · 0 评论 -
yii控制器传值到layout方法
程序代码class SiteController extends CController{ public $aboutLittle = null ; //定义一个属性,一定要是public的,要不layout中访问不到 public function actionIndex() { $this->aboutLitt转载 2016-04-25 19:27:05 · 1997 阅读 · 0 评论