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

thinkPHP,分页查询有关问题

WBOY
WBOYOriginal
2016-06-13 12:36:55906browse

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 分页
Statement:
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