codeigniter pagination url with get parameters

后端 未结 15 1880
野的像风
野的像风 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 14:56

    The most up-to-date answer of this question is;

    You should enable the reusage of the query string by enabling this configuration:

    $config['reuse_query_string'] = true;
    

    after that you should initialize the pagination:

    $this->pagination->initialize($config);
    

    Added $config['reuse_query_string'] to allow automatic repopulation of query string arguments, combined with normal URI segments. - CodeIgniter 3.0.0 Change Log

提交回复
热议问题