我在 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
如果手动添加一个零,例如 www.example.com/job-history/0,它将起作用。
如何加载 www.example.com/job-history 作为第一页。我的困惑有什么问题。请提供任何帮助