加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

thinkPHP3.2.3结合Laypage实现的分页功能示例

发布时间:2020-12-14 14:10:24 所属栏目:大数据 来源:网络整理
导读:本篇章节讲解thinkPHP3.2.3结合Laypage实现的分页功能。供大家参考研究具体如下: 控制器 count())/10); $infos=D('data')->limit(($nowpage-1)*10,10)->select(); }else{ $totalpage=ceil((D('data')->where($c)->count())/10); $infos=D('data')

本篇章节讲解thinkPHP3.2.3结合Laypage实现的分页功能。分享给大家供大家参考,具体如下:

控制器

count())/10); $infos=D('data')->limit(($nowpage-1)*10,10)->select(); }else{ $totalpage=ceil((D('data')->where($c)->count())/10); $infos=D('data')->where($c)->limit(($nowpage-1)*10,10)->select(); } }else{ if($choose == -6) { $map['data'] = array('like',"%$type%"); $totalpage=ceil((D('data')->where($map)->count())/10); $infos=D('data')->where($map)->limit(($nowpage-1)*10,10)->select(); }else{ $map['data'] = array('like',"%$type%"); $totalpage=ceil((D('data')->where($map)->where($c)->count())/10); $infos=D('data')->where($map)->where($c)->limit(($nowpage-1)*10,10)->select(); } } $this->assign('type',$type); $this->assign('choose',$choose); $this->assign("totalpage",$totalpage); $this->assign("infos",$infos); $this -> display(); } }

视图层

Think Demo
" id="type">

ID {$vo.id}
语言 难易程度 操作 {$vo.data} 一般