codeigniter pagination url with get parameters

后端 未结 15 1898
野的像风
野的像风 2020-12-12 14:52

I am having trouble setting up pagination on codeigniter when I pass parameters in the URL

if my url is like this : search/?type=groups

what sho

15条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-12 15:02

    I got the same problem. My solution is to modify Pagination and put it in application/libraries. First i create

    var $get='';
    

    and find all "a" elements and add $get in the href="........'.$this->get.'"'>.......

    Now in the controller or model input these line

    $config['get']=(isset($_GET['search']))?'?search='.$_GET['search']:'';
    

    That's it! i hope it will help you.

提交回复
热议问题