2013-10-18 52 views
0

我使用最新版本的codeigniter(2.1.4)。在管理員時,我發送查詢字符串,然後分頁不working.And我想我的網址將像mydomain /佣金/ USER_ID/page_no。 例如:MYDOMAIN /佣金/1分之20 下面是我的代碼Codeigniter分頁不工作時有一個查詢字符串

$config['per_page'] = 2; 
$config['total_rows']=100; 
$config['base_url'] = base_url().'admin_vendor/commissions/'.$this->uri->segment(3); 
$config['use_page_numbers'] = TRUE;  
$config['page_query_string'] = FALSE; 
$config['enable_query_strings']=FALSE; 
$config['num_links'] = 20; 
$config['full_tag_open'] = '<ul>'; 
$config['full_tag_close'] = '</ul>'; 
$config['num_tag_open'] = '<li>'; 
$config['num_tag_close'] = '</li>'; 
$config['cur_tag_open'] = '<li class="active"><a>'; 
$config['cur_tag_close'] = '</a></li>';   
$config['next_link'] = 'Next&gt;';  
$config['next_tag_open'] = '<li>';  
$config['next_tag_close'] = '</li>';   
$config['prev_link'] = '&lt;Prev';  
$config['prev_tag_open'] = '<li>'; 
$config['prev_tag_close'] = '</li>'; 
$page = $this->uri->segment(4);   
$limit_end = ($page * $config['per_page']) - $config['per_page']; 
if ($limit_end < 0){ 
$limit_end = 0; 
} 

請指導我。由於

+0

'$配置[ 'enable_query_strings'] = TRUE;'它的虛假你case –

+1

其中是'$ config ['uri_segment']'?爲什麼你要發送查詢字符串?將它作爲細分發送? –

+0

$ config ['enable_query_strings'] = TRUE;當我做這個'下一步'按鈕不來。 – user1987095

回答

0

去申請/ config.php文件

,改變$config['enable_query_strings'] = FALSE;

$config['enable_query_strings'] = TRUE; 

它將工作