开发者

Problem with paging when using query string in codeigniter

i am using query string to search in codeigniter. my url is like

http:开发者_如何学C// localhost/testing/main?serch=res

but my paging is like

http: //localhost/testing/main/10

now i want to attach "?serch=res" with paging

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

how can i attach please help


If you're willing to use segments you could format your url like so:

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

then to access your serch and pagination parameters it would be:

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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜