但是显示出来的分页地址不对。我这个分过组的,所以多了一项/index/.
他显示出来的分页地址是http://localhost/wish/index.php/Index/Fenye/p/1.html(这个是错的)
而事实上真的url地址是
http://localhost/wish/index.php/Index/Index/Fenye/p/1.html(这个是对的)
请问,这个怎么弄才对啊。。
$Data = M('Data'); // 实例化Data数据对象
import('ORG.Util.Page');// 导入分页类
$count = $Data->where($map)->count();// 查询满足要求的总记录数 $map表示查询条件
$Page = new Page($count);// 实例化分页类 传入总记录数
$show = $Page->show();// 分页显示输出
// 进行分页数据查询
$list = $Data->where($map)->order('create_time')->limit($Page->firstRow.','.$Page->listRows)->select();
$this->assign('list',$list);// 赋值数据集
$this->assign('page',$show);// 赋值分页输出
$this->display(); // 输出模板
我是按教程这么做的分页 最佳答案
