设置了url_suffix后的分页问题
设置了url_suffix为.html分页出了问题
分页设置:
$pageConfig['base_url'] = site_url('news/newsList');
$pageConfig['total_rows'] = $this->count_all($cat);
$pageConfig['per_page'] = 10;
$pageConfig['uri_segment'] = 3;
$pageConfig['full_tag_open'] = '';
$pageConfig['full_tag_close'] = '';
return $pageConfig;
列表页连接为:http://localhost/news/newsList.html
第二页的页码连接却成了:
http://localhost/news/newsList.html/10
这样报错找不到文件的
应该是这个连接才对http://localhost/news/newsList/10.html
请问怎么回事啊,是不是设置了url_suffix,分页类就不好用了????
谢谢! 看了一下pagination,果然没有对设置url_suffix的判断,给pagination类加上一个url_suffix属性,然后更改creat_links方法,给每个连接后都加上.$this->url_suffix就算修改好了pagination类。
应用:
在设置page的config的时候加上一条$pageConfig['url_suffix'] = '.html';
搞定,写下来记住啦,嘿嘿 呵呵,看来是分页类没有考虑后缀的问题,需要进行一些扩展。 http://codeigniter.org.cn/forums/thread-19402-1-1.html这里有完美答案
页:
[1]