tp3.1.3 用了路由,分页地址不随其改变 怎么改?

浏览:771 发布日期:2016/09/02 分类:求助交流 关键字: 路由 分页
用路由后的地址:http://localhost/sindex/
分页地址:http://localhost/product/sindex/p/2.html
我想让其变成:http://localhost/sindex/2.html

本人新手一枚,那位高手帮忙指点一下,不胜感激,适当收点费用也可,


这是控制器部分代码:
import('ORG.Util.Page');
$count = $this->product->where($map)->count();
$num = 18;
$page = new Page($count,$num);
foreach($getval as $key=>$val) {
$page->parameter .= "$key=".urlencode($val).'&';
}

$show = $page->show();
$limit = $page->firstRow.','.$page->listRows;
$res = $this->selectinfo($this->product,$map,$order,$limit);
foreach ($res as $k => $v) {
$start = 0, $suffix = 0);
$res[$k]["price"]=$this->getfjg($v["id"],$shi);
}
$list = $res;
$this->assign('page',$show);
$this->assign('list',$list);
最佳答案
评论( 相关
后面还有条评论,点击查看>>