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类。到底是怎么回事,我已经导入了呀
回复讨论(解决方案)
你导入的Page类是系统目录下的Lib/ORG/Util/Page.class.php类文件吗?
不是,在这个目录下没有找到这个Page.class.php文件。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