我是Codeigniter的新手 我的列表页面重定向到详细信息页面 带分页的列表页面
url => holida.local/destinations/explore/all-destinations/3
所有目的地平均类别名称
我的目的地详细信息页面
url => holida.local/destinations/explore/hill-country/badulla
我将我的溃败改为---
$route['default_controller'] = 'home';
$route['destinations/(:any)/(:any)/(:any)'] = "destinations/detail/$1/$1";
当我点击分页下一个按钮重定向它的详细信息页面(它应该是列表页面)没有路由分页正常工作
答案 0 :(得分:0)
试试这个 - 更新:
$route['destinations/detail/(:any)/(:any)'] = "destinations/detail/$1/$2";
$route['destinations/explore/(:any)/(:any)'] = "destinations/explore/$1/$2";
答案 1 :(得分:0)
这个工作
$ route ['destinations / explore /(:any)/(:num)'] =“destinations / explore / $ 1 / $ 2”; $ route ['destinations / explore /(:any)/(:any)'] =“destinations / detail / $ 1 / $ 1”;