分页跳转POST保持不了

浏览:462 发布日期:2016/03/03 分类:求助交流 关键字: 查询分页
多条件查询,查询结果分页点击下一页直接显示parameter为空

$count = $article->where($map)->count();
$p = new Page($count,1);
//分页跳转的时候保证查询条件
$condition = array('tdf'=>$keyword,'dz'=>$dz,'nf'=>$nf,'lb'=>$lb,);
foreach($condition as $key=>$val) {
$p->parameter[$key] = urlencode($val);
}
dump($p);
$p->setConfig('prev','上一页');
$p->setConfig('header','篇文章');

dump内容:
object(Page)[7]
public 'firstRow' => int 0
public 'listRows' => int 1
public 'parameter' =>
array
'tdf' => string '590' (length=3)
'dz' => string '%E5%8C%97%E4%BA%AC' (length=18)
'nf' => string '2012' (length=4)
'lb' => string '%E6%96%87%E5%8F%B2' (length=18)

点击下一页后,dump内容:
object(Page)[7]
public 'firstRow' => int 1
public 'listRows' => int 1
public 'parameter' =>
array
'tdf' => string '' (length=0)
'dz' => string '' (length=0)
'nf' => string '' (length=0)
'lb' => string '' (length=0)

可见POST参数没保持。
最佳答案
评论() 相关
后面还有条评论,点击查看>>