lunatic27 发表于 2011-3-17 11:55:29

分页问题

如果
$this->load->library ( array('pagination','table') );
$this->load->model ( 'Db' );
$config ['base_url'] = 'http://localhost/php_eg2/fblog/index/';
$config ['total_rows'] = $this->Db->select_allrow();
$config ['per_page'] = '3';
$this->pagination->initialize ( $config );
$data ['results'] = $this->Db->select ( $config ['per_page'], $this->uri->segment ( 3 ) );
$this->table->set_heading ( 'ID', 'Name', 'Pass', 'Email' ,'Uid','Uidname');
$this->load->view ( 'view_book', $data );
base_url这样配置没错误,分页也可以正常运行

但是我把
$config ['base_url'] = 'http://localhost/php_eg2/eg/fblog/index/';
配置fblog前多了个目录,也不是不行,就是不能返回第一行

zhouli520 发表于 2011-3-17 13:31:30

$this->uri->segment ( 3 )改成4?

zfm1988 发表于 2011-3-17 14:14:00

$this->uri->segment ( 3 )改成4?
zhouli520 发表于 2011-3-17 13:31 http://codeigniter.org.cn/forums/images/common/back.gif
支持下,你应该多看看ci分页类

lunatic27 发表于 2011-3-18 13:43:40

我是改了4,但不能返回到第一页
页: [1]
查看完整版本: 分页问题