我已經配置在routes.php文件作爲路徑,在控制器笨分頁路由問題
$route['job-history/(:num)'] = "customer/customer/jobhistory/$1";
和分頁配置如下,
$this->load->library('pagination');
$config['per_page'] = 25;
$config['total_rows'] = 100;
$config['base_url'] = $this->config->item('base_url').'job-history';
$config["uri_segment"] = 2;
$this->pagination->initialize($config);
$page = ($this->uri->segment(2)) ? $this->uri->segment(3) : 0;
及其表示404錯誤頁面加載時,
www.example.com/job-history
它會工作,如果手動添加az像www.example.com/job-history/0這樣的ero。
我如何可以加載www.example.com/job-history作爲第一頁。我的配置有什麼問題。任何幫助,請
@Cryode是正確的。你可以嘗試通過使用'$ route ['job-history(/:num)'''='customer/customer/jobhistory $ 1''將兩條路線合併成一條路線;''我沒有測試它,但是給它一試。 –