新手求助啊 ci的分页 来看看吧
$config['per_page'] = 1;$config['base_url'] = 'http://localhost/index.php/index_c/index/';
$config['total_rows'] = $this->db->count_all('pc');
$config['uri_segment'] = 3;
$arr = $this->index_m->fenye($config['per_page'],$this->uri->segment(3));
$this->pagination->initialize($config);
foreach($arr as $data_item){
print_r($data_item)."<br />";
}
echo $this->pagination->create_links();
这是控制器代码;还有在这个页面显示分页 分页类已经载入了,能显示分页没有报错 但是点击分页的那个123或者是最后一页什么的都没反应这是怎么回事啊搞半天了 这个问题一般是base_url那里出问题了,你再好好检查一下 我试过了啊,试好长时间啦,我的控制器在index.php/index_c/index方法啊 :'(:'(:'(:'( http://localhost/index.php/index_c/index/&per_page=1 为什么 点击 123 这个分页连接 url是这个样子的
而且点击分页后面的那个per_page=1会动的就是内容不换 咋回事啊 :(:(:(:(:( :D:(:(:(:( 哦我研究出来了,那个地址http://localhost/index.php/index_c/index/&per_page=1的
怎么变成http://localhost/index.php/index_c/index/1 这样的 我手动加上去就能用了 哪里需要改一下啊 没人回答吗?| :(:(:(:(:(:(:( :(:(:(:(:(:(
页:
[1]
2