|
分页函数为什么会失控!
这个是成功的
class news extends CI_Controller{
function __construct(){
parent::__construct();
}
function trys(){
$this->load->library('pagination');
$this->load->helpers('url');
$config['base_url'] = site_url('news/trys');
$config['total_rows'] = 200;
$config['per_page'] = 20;
$this->pagination->initialize($config);
$offset = intval($this->uri->segment(3));
echo $offset;
$data['links'] = $this->pagination->create_links();
$this->load->view('new',$data);
}
}
这个是失败的
function show(){
$this->load->library('pagination');
$this->load->helpers('url');
$config['base_url'] = site_url('admin/absent_info/show');
$config['total_rows'] = 200;
$config['per_page'] = 20;
$this->pagination->initialize($config);
$offset = intval($this->uri->segment(4));
echo $offset;
$data['link'] = $this->pagination->create_links();
$this->load->view('admin/sort6_1',$data);
}
我只是路由的层数多了一层为什么他的下一页就下不去了,默认的永远都是第一页。怎么点击其他的页,都是第一
|
|