|
http://WWW.XXXX.com/index/more/new.shtml/2
这是目前分页的样子
我想让它变成这个样子
http://WWW.XXXX.com/index/more/new/2.shtml
该怎么做,具体点,帮忙一下。
控制器:
function more($type ='good') {
$session = $this->m_index->get_session ();
$view_datas ['uname'] = $session ['uname'];
$type = $type ? $type : 'new';
$count = $this->m_index->counts ( 'essay' );
$this->load->library ( 'pagination' );
$config ['base_url'] = site_url("index/more/".$type);
$config ['total_rows'] = $count;
$config ['per_page'] = 6;
$config ['uri_segment'] = 4;
$config ['full_tag_open'] = '<p style="float:right; margin-right:30px;">';
$config ['full_tag_close'] = '</p>';
$config ['last_link'] = '尾页';
$config ['first_link'] = '首页';
$config ['next_link'] = '下一页';
$config ['prev_link'] = '上一页';
$page=(int)$this->uri->segment ( 4 );
$start = $page ? $page : 1;
$start = $start * 6 - 6;
$config ['use_page_numbers'] = TRUE;
$this->pagination->initialize ( $config );
$view_datas ['pages'] = $this->pagination->create_links ();
$view_datas ['datas'] = $this->m_index->more ( $type, $start, $config ['per_page'] );
$this->load->view ( 'more', $view_datas );
}
|
|