我的链接:http://asdasd.com/*****/****/urunler?kategori=5
我需要为我的页面添加分页。
我的代码:
$config['base_url'] = base_url().'index.php/asd/urunler?kategori='.$kateg;
$config['total_rows'] = $this->anime_model->kategorisayi($kateg);
$config['per_page'] = 3;
$config['first_link'] = '<a href="#" class="prevposts">Önceki</a>';
$config['last_link'] = '<a href="#" class="nextposts">Sonraki</a>';
$config['cur_tag_open'] = '<a href="#" class="activeposts">';
$config['cur_tag_close'] = '</a>';
$this->pagination->initialize($config);
当我点击分页链接时,页面没有改变。
http://asdasd.com/yenianimesatis/index.php/anime/urunler?kategori=5/3
我该如何解决?
编辑:当我使用此代码时
$config['suffix'] = '/?'.http_build_query($_GET, '', "&");
第 2 页:http://asasgs/yenianimesatis/index.php/anime/urunler/5/?kategori=5
,但第 1 页:http://asgasg/yenianimesatis/index.php/anime/urunler/
它必须是这样的:http://asgasg/yenianimesatis/index.php/anime/urunler/?kategori=5