摘要:
控制器 : $page = $_POST['page'] ? $_POST['page'] : 0;$size = 10;$pian = $page * $size;$jour = M('zy_journalism')->field('title,text,img,id,link,source,ab 阅读全文
摘要:
//html <extend name="Public/base" /><block name="body"> <!-- 标题栏 --> <div class="main-title"> <h2>app用户</h2> </div> <div class="cf"> <div class="fl"> 阅读全文
摘要:
//html <extend name="Public/base" /><block name="body"> <!-- 标题栏 --> <div class="main-title"> <h2>期刊杂志列表</h2> </div> <div class="cf"> <div class="fl"> 阅读全文
摘要:
public function browse(){ $id = I('get.jour_id'); //新闻id $article = M('app_journalism')->where(['id'=>$id])->find(); if(!$article){ $this->success('未找 阅读全文
摘要:
//新闻点赞public function praise(){ if (!is_login()) { $this->returnBack(2, '请先登录'); } $id = I('post.jour_id'); //新闻id $type = I('post.type'); //点赞状态 $art 阅读全文
摘要:
//登陆控制器 function actionLogin(){ $name=Yii::$app->request->post("name"); $pass=Yii::$app->request->post("pass"); $res= Yii::$app->db->createCommand("select * from user wher... 阅读全文
摘要:
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 阅读全文
摘要:
<?phpclass db{ public $table=null; public $pdo; public $where=null; //where 条件 public $field=null; //要查询的条件 public function __construct() { $this->pdo 阅读全文
摘要:
表单//@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=" 阅读全文
摘要:
//表单@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 阅读全文