编码点火器default_controlller和分页



当我转到任何页面时,我得到404页面

路线.php

$route['default_controller'] = "home";    
$route['default_controller/page/(:any)'] = 'home/$1';

控制器(家用.php(

public function index($ppage=1)
{
$this->load->library('pagination');
$config['use_page_numbers'] = TRUE;
$config['uri_segment'] = 2;
$config['num_links'] = 5;
$config['base_url'] = 'http://www.test.com/page/';
$config['first_url'] = 'http://www.test.com/page/1';
$this->pagination->initialize($config);
}

当我转到 URLhttp://www.test.com/page/1http://www.test.com/page/2时,我得到 404 找不到。 我哪条线出错了?

$route['default_controller/page/(:any)'] = 'home/$1';

默认控制器不是变量:

$route['home/page/(:any)'] = 'home/$1';

或者如果这不起作用:

$route['page/(:any)'] = 'home/$1';

有点奇怪的方法。

相关内容

  • 没有找到相关文章

最新更新