我正在获得codeigniter分页网址
http://myapp.com/sample/2
但我想得到像
这样的网址http://myapp.com/sample?page=2
我已设置$_config['page_query_string']=True,
但没有用,任何人都可以告诉如何解决这个问题
答案 0 :(得分:0)
他的代码在php中,在codeigniter中应该是相同的。
$url = $_SERVER["REQUEST_URI"];
$path = explode("=", $url);
$last = end($path);
变量$将代表你站立的最后一页
答案 1 :(得分:0)
试试这个
$config['page_query_string'] = TRUE;
$config['enable_query_strings'] = TRUE;
分页链接将变为类似
http://myapp.com/sample?&m=page&per_page=20