2016年4月14日
摘要: yii2中使用顶部导航的具体方法: 1.视图中调用两个类: use yii\bootstrap\Nav;use yii\bootstrap\NavBar; 2. <?php NavBar::begin([ 'brandLabel' => 'My Company', 'brandUrl' => Yii 阅读全文
posted @ 2016-04-14 20:54 久违的绽放 阅读(2597) 评论(0) 推荐(0) 编辑
摘要: $cache=Yii::$app->cache;$cache->set("key","123", 45);echo $cache->get("key"); 阅读全文
posted @ 2016-04-14 14:52 久违的绽放 阅读(167) 评论(0) 推荐(0) 编辑
摘要: $_SERVER["REMOTE_ADDR"] 阅读全文
posted @ 2016-04-14 10:22 久违的绽放 阅读(205) 评论(0) 推荐(0) 编辑
摘要: <link rel="stylesheet" href="http://cdn.staticfile.org/twitter-bootstrap/3.2.0/css/bootstrap.min.css" type="text/css"> 阅读全文
posted @ 2016-04-14 08:14 久违的绽放 阅读(236) 评论(0) 推荐(0) 编辑
  2016年4月13日
摘要: $count = Acticle::find()->select("acticle_type.act_type,acticle.act_id,acticle.act_title,acticle.act_content")->join("inner join","acticle_type","acti 阅读全文
posted @ 2016-04-13 19:18 久违的绽放 阅读(121) 评论(0) 推荐(0) 编辑
摘要: $(document).on("click",".btn_small",function(){ var add = document.getElementsByName("add[]"); var del = document.getElementsByName("del[]"); var leng 阅读全文
posted @ 2016-04-13 19:17 久违的绽放 阅读(336) 评论(0) 推荐(0) 编辑
摘要: $query = self::find()->andFilterWhere(['v_type' => $v_type])->andFilterWhere(['like', 'a_name', $sea])->asArray()->all(); 阅读全文
posted @ 2016-04-13 15:14 久违的绽放 阅读(291) 评论(0) 推荐(0) 编辑
  2016年4月12日
摘要: js跳转页面 js跳转页面 <span id="tiao">3</span><a href="javascript:countDown"></a>布丁足迹;秒后自动跳转……<meta http-equiv=refresh content=3;url='/search/billsearch.jsp'< 阅读全文
posted @ 2016-04-12 09:40 久违的绽放 阅读(225) 评论(0) 推荐(0) 编辑
摘要: $dependency = [ 'class' => 'yii\caching\DbDependency', 'sql' => 'SELECT MAX(u_id) FROM user',];//设置片段缓存if ($this->beginCache('goods',['duration'=>3600 阅读全文
posted @ 2016-04-12 08:30 久违的绽放 阅读(136) 评论(0) 推荐(0) 编辑
  2016年4月11日
摘要: function clean($str) { $str=trim($str); $str=strip_tags($str); $str=stripslashes($str); $str=addslashes($str); $str=rawurldecode($str); $str=quotemeta 阅读全文
posted @ 2016-04-11 15:30 久违的绽放 阅读(167) 评论(0) 推荐(0) 编辑