show("/>
PHP头条
热点:

thinkPHP,分页查询有关问题


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 分页 分享到:
------解决方案--------------------
你导入的Page类是系统目录下的Lib/ORG/Util/Page.class.php类文件吗?

www.phpzy.comtrue/phprm/11760.htmlTechArticlethinkPHP,分页查询有关问题 thinkPHP,分页查询问题 $reg=M('reg'); //计算总数 $count=$reg->count(); //导入分页类 import("ORG.Util.Page"); //实例化分页类 $p=newPage($count,5); //分页显示输出 $page=$p->show(...

相关文章

相关频道:

PHP之友评论

今天推荐