请问分页时,如何传递post中的参数

浏览:3037 发布日期:2015/03/11 分类:求助交流
教程中说:默认情况下,分页类会自动获取当前页面的POST(优先)或者GET变量作为分页跳转的传值。

可我搜索时第一页正常,再点其他页就没传递参数了
$m=D('Product');
import('ORG.Util.Page');
$where['nid']=array('like','%'.I('post.so1').'%');
$where['title']=array('like','%'.I('post.so2').'%');
$where['tj']=array('EQ',I('post.tj'));
$count=$m->where($where)->count();//计算总记录数
$page=new Page($count,9);
$this->list=$m->where($where)->relation('user')->order('createtime desc,id desc')->limit($page->firstRow.','.$page->listRows)->select();
$this->assign('page',$page->show());//分页按钮

请大家指点一下
最佳答案
评论( 相关
后面还有条评论,点击查看>>