|
简单的小例子 帮看看 哪里出了问题 惆怅了。。。
这个是INDEX函数里的
$this->load->library('pagination');
$config['base_url'] = site_url('create/index');
$config['total_rows'] = $this->db->count_all('password');
$config['per_page'] = 5;
$config['full_tag_open'] = '<p>';
$config['full_tag_close'] = '</p>';
$this->pagination->initialize($config);
$this->load->library('table');
$this->load->model('display');//数据库查询
$data['results'] = $this->display->select_except_password();
$this->load->view('create_page',$data);
下面是页面create_page
<?php echo $this->table->generate($results); ?>
<?php echo $this->pagination->create_links(); ?>
问题是:PER_PAGE貌似没有设置上 每页还是现实好多 按理来说不应该是5个么 |
|