我已经配置在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''将两条路线合并成一条路线;''我没有测试它,但是给它一试。 –