Home > Backend Development > PHP Tutorial > thinkPHP,分页查询有关问题

thinkPHP,分页查询有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:36:04
Original
764 people have browsed it

thinkPHP,分页查询问题
$reg = M('reg'); 
// 计算总数
    $count = $reg->count();
    // 导入分页类
    import("ORG.Util.Page");
    // 实例化分页类
    $p = new Page($count, 5);
    // 分页显示输出
    $page = $p->show();
    // 当前页数据查询
    $list = $reg->order('id')->limit($p->firstRow.','.$p->listRows)->select();
    // 赋值赋值
    $this->assign('page', $page);
    $this->assign('list', $list);
实例化分页类错误,找不到Page类。到底是怎么回事,我已经导入了呀

thinkphp 分页
Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template