thinkphp 3.2.3 iis7服务 get传值分页查询,第二页时乱码 本地正常,服务器错误, 10
if(isset($_GET['car_name'])&&$_GET['car_name']!=null){$where['wap_name']=array('like'...
if(isset($_GET['car_name']) && $_GET['car_name']!=null){
$where['wap_name']=array('like',"%{$_GET['car_name']}%");
}
echo $_GET['car_name'];
$wap=M('Wap');
$where['wap_sell']=1;
$count=$wap->where($where)->count();//查询满足要求的总记录数
$page=new \Think\Page($count,7);//实例化分页类 传入总记录数和每页显示的记录数(10)
$page->setConfig('theme', '%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%');
$show=$page->show();//分页显示输出
$list=$wap->where($where)->order('wap_id DESC')->limit($page->firstRow.','.$page->listRows)->select();
$this->assign('list',$list);
$this->assign('page',$show);
//dump($list);
$this->display();
}else {
$this -> redirect("Index/login");
} 展开
$where['wap_name']=array('like',"%{$_GET['car_name']}%");
}
echo $_GET['car_name'];
$wap=M('Wap');
$where['wap_sell']=1;
$count=$wap->where($where)->count();//查询满足要求的总记录数
$page=new \Think\Page($count,7);//实例化分页类 传入总记录数和每页显示的记录数(10)
$page->setConfig('theme', '%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%');
$show=$page->show();//分页显示输出
$list=$wap->where($where)->order('wap_id DESC')->limit($page->firstRow.','.$page->listRows)->select();
$this->assign('list',$list);
$this->assign('page',$show);
//dump($list);
$this->display();
}else {
$this -> redirect("Index/login");
} 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询