$CI =& get_instance();
if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
{
if ($CI->input->get($this->query_string_segment) != $base_page)
{
$this->cur_page = $CI->input->get($this->query_string_segment);
// Prep the current page - no funny business!
$this->cur_page = (int) $this->cur_page;
}
}
else
{
if ($CI->uri->segment($this->uri_segment) != $base_page)
{
$this->cur_page = $CI->uri->segment($this->uri_segment);
// Prep the current page - no funny business!
$this->cur_page = (int) $this->cur_page;
}
}
с
if(isset($_GET['cur_page'])){
$this->cur_page = $_GET['cur_page'];
}else{
$this->cur_page = 1;
}
&
if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
{
$this->base_url = rtrim($this->base_url).'&'.$this->query_string_segment.'=';
}
else
{
$this->base_url = rtrim($this->base_url, '/') .'/';
}
удалите это.
Называй как,
include_once(LIB_DIR.'/pagination.class.php');
$pagination = new Pagination();
$config['base_url'] = 'http://testme.com/stats.php?cur_page=';
$config['total_rows'] = 200;
$config['per_page'] = 20;
$pagination->initialize($config);
echo $pagination->create_links();