在codeigniter中使用查询字符串时出现分页问题

时间:2011-03-26 00:19:40

标签: string codeigniter

我正在使用查询字符串在codeigniter中搜索。 我的网址就像

http:// localhost / testing / main?serch = res

但我的分页就像

http:// localhost / testing / main / 10

现在我想附加“?serch = res”和分页

http:// localhost / testing / main / 10?serch = res

我如何附上请帮助

1 个答案:

答案 0 :(得分:1)

如果您愿意使用细分,则可以格式化您的网址:

http:// localhost / testing / main / res / 10

然后访问你的serch和分页参数:

$serch = $this->uri->segment(2);
$per_page = $this->uri->segment(3);

http://codeigniter.com/user_guide/libraries/uri.html

相关问题