I wouldn't bother with the query string, use a variable passed straight from the url/controller. Also, I think your base url is wrong. It should be (assuming your are on the default index function page)
$config['base_url'] = site_url("test/index");
You don't need to put the vars at the end of the base url. If you have query strings enabled (i don't think you do though), this would be the same, CI should handle all the renaming, just extracting the variables will be different.
So controller should be
class Test extends Controller {
function index($offset = 0)
{
$this->load->library('pagination');
$config['base_url'] = site_url("test/index");
$config['total_rows'] = $search_results->num_rows();
$config['per_page'] = 20;
$config['uri_segment'] = 3;
$this->pagination->initialize($config);
// DO OTHER STUFF
}
}
You can set the limit in your config. Do you need to do it from the URL?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…