当我单击下一个链接时,它会产生 http://127.0.0.1/workk/client/home/index/5 当我再次单击下一个链接时,它会停留在这里,其他链接也可以正常工作,例如2、3、4,最后一个上一个链接也未显示我的数据库中有180个数据
$ this-> load-> library('pagination');
$config = [
'base_url' => base_url('client/home/index'),
'per_page' => 5,
'total_rows' => $this->client->num_rows($com_id),
'num_links' => 5
];
$config['full_tag_open'] = '<ul class="pagination">';
$config['full_tag_close'] = '</ul>';
$config['next_link'] = 'Next';
$config['num_tag_open'] = '<li class="page-item">';
$config['num_tag_close'] = '</li>';
$config['cur_tag_open'] = '<li><a>';
$config['cur_tag_close'] = '</a></li>';
$config['next_tag_open'] = '<li class="page-item">';
$config['next_tag_close'] = '</a></li>';
$config['prev_link'] = 'Prev';
$config['prev_tag_open'] = '<li class="page-item">';
$config['prev_tag_close'] = '</li>';
$config['first_tag_open'] = '<li class="page-item disabled">';
$config['first_tag_close'] = '</li>';
$config['last_tag_open'] = '<li class="page-item">';
$config['last_tag_close'] = '</a></li>';
$this->pagination->initialize($config);
$data['transactions'] = $this->client->transactions_table_model($com_id, $config['per_page'], $this->uri->segment(3));
in view-><?php echo $this->pagination->create_links(); ?>