摘要: 控制器 : $page = $_POST['page'] ? $_POST['page'] : 0;$size = 10;$pian = $page * $size;$jour = M('zy_journalism')->field('title,text,img,id,link,source,ab 阅读全文
posted @ 2020-05-07 10:40 php毛宏历的博客 阅读(186) 评论(0) 推荐(0) 编辑
摘要: //html <extend name="Public/base" /><block name="body"> <!-- 标题栏 --> <div class="main-title"> <h2>app用户</h2> </div> <div class="cf"> <div class="fl"> 阅读全文
posted @ 2020-01-15 16:02 php毛宏历的博客 阅读(205) 评论(0) 推荐(0) 编辑
摘要: //html <extend name="Public/base" /><block name="body"> <!-- 标题栏 --> <div class="main-title"> <h2>期刊杂志列表</h2> </div> <div class="cf"> <div class="fl"> 阅读全文
posted @ 2020-01-15 15:59 php毛宏历的博客 阅读(315) 评论(0) 推荐(0) 编辑
摘要: public function browse(){ $id = I('get.jour_id'); //新闻id $article = M('app_journalism')->where(['id'=>$id])->find(); if(!$article){ $this->success('未找 阅读全文
posted @ 2020-01-11 14:33 php毛宏历的博客 阅读(173) 评论(0) 推荐(0) 编辑
摘要: //新闻点赞public function praise(){ if (!is_login()) { $this->returnBack(2, '请先登录'); } $id = I('post.jour_id'); //新闻id $type = I('post.type'); //点赞状态 $art 阅读全文
posted @ 2020-01-11 14:31 php毛宏历的博客 阅读(489) 评论(0) 推荐(0) 编辑
摘要: //登陆控制器 function actionLogin(){ $name=Yii::$app->request->post("name"); $pass=Yii::$app->request->post("pass"); $res= Yii::$app->db->createCommand("select * from user wher... 阅读全文
posted @ 2019-07-18 14:39 php毛宏历的博客 阅读(373) 评论(0) 推荐(0) 编辑
摘要: function ad(){ $res=DB::table("category")->get(); $res= json_encode($res); $res= json_decode($res,1); $arr= $this->gettree($res,0); var_dump($arr);} f 阅读全文
posted @ 2019-07-16 15:33 php毛宏历的博客 阅读(287) 评论(0) 推荐(0) 编辑
摘要: <?phpclass db{ public $table=null; public $pdo; public $where=null; //where 条件 public $field=null; //要查询的条件 public function __construct() { $this->pdo 阅读全文
posted @ 2019-07-16 10:08 php毛宏历的博客 阅读(596) 评论(0) 推荐(0) 编辑
摘要: 表单//@foreach($res as $k=>$v) <tr id="{{$v->id}}" > <td>{{$v->id}}</td> <td >{{$v->tye}}</td> <td fd="name" > {{$v->name}}</td> <td><a href="#" class=" 阅读全文
posted @ 2019-07-15 14:22 php毛宏历的博客 阅读(437) 评论(0) 推荐(0) 编辑
摘要: //表单@if($v['sex']==0) <td class="se" ss="{{$v['sex']}}" id="{{$v['id']}}" >男</td> @elseif($v['sex']==1) <td class="se" ss="{{$v['sex']}}" id="{{$v['id 阅读全文
posted @ 2019-07-14 21:28 php毛宏历的博客 阅读(518) 评论(0) 推荐(0) 编辑