$config['base_url'] = base_url() . 'transaksi/index/';
$config['total_rows'] = 21;
$config['per_page'] = 10;
$config['uri_segment'] = 3;
$config['first_link'] = 'Awal';
$config['last_link'] = 'Akhir';
$config['next_link'] = 'Selanjutnya';
$config['prev_link'] = 'Sebelumnya';
$this->pagination->initialize($config);
$bc["paginator"] = $this->pagination->create_links();
$this->load->view('transaksidigor/bg_home',$bc);
自动加载:
$autoload['libraries'] = array('database','session','pagination','form_validation','security');
![在此处输入图片说明] [1]
答案 0 :(得分:0)
问题是你有base_url()
缺少index.php我猜。相反,你应该总是使用site_url()
。这样你或者设置了index.php,它总是会把你送到你要去的页面。
$config['base_url'] = site_url('transaksi/index');
$config['total_rows'] = 21;
$config['per_page'] = 10;
$config['uri_segment'] = 3;
$config['first_link'] = 'Awal';
$config['last_link'] = 'Akhir';
$config['next_link'] = 'Selanjutnya';
$config['prev_link'] = 'Sebelumnya';
$this->pagination->initialize($config);
$bc["paginator"] = $this->pagination->create_links();
$this->load->view('transaksidigor/bg_home',$bc);
答案 1 :(得分:0)
请替换
$ config ['uri_segment'] = 3; to $ config ['uri_segment'] = $ this-> uri-> rsegment(3);