thinkPHP3.2.3 combines Laypage to implement paging function

不言
Release: 2023-03-30 14:38:02
Original
1630 people have browsed it

这篇文章主要介绍了thinkPHP3.2.3结合Laypage实现的分页功能,结合实例形式分析了thinkPHP3.2.3结合Laypage实现分页的model控制器与view视图相关操作技巧,需要的朋友可以参考下

本文实例讲述了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(); } }
Copy after login

视图层

    Think Demo     

{$type} " id="type">


ID 语言 难易程度 操作
{$vo.id} {$vo.data} 简单 一般 删除 修改


Copy after login

以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!

相关推荐:

thinkPHP中统计排行与分页显示的功能

thinkphp实现分页显示功能

The above is the detailed content of thinkPHP3.2.3 combines Laypage to implement paging function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!