tottyandbaty 发表于 2010-6-4 16:31:08

遇到一個麻煩事情

我的路由規則配置如下:
$route['list/(:any)/(:any)'] = "videos/category/$1/$2";

關鍵是這個category方法接受的參數個數不限制,
可能產生這樣的鏈接
http://site.com/list/class1/1.html

http://site.com/list/class1/1/2.html

http://site.com/list/class1/class2/3.html

http://site.com/list/class1/class2/3/2.html

我的分頁的base_url 怎麼設置呢?路由又怎麼設置?請大家不吝賜教!謝謝

visvoy 发表于 2010-6-4 20:12:14

这不用设路由,用_remap()就可以了
class yourController extends Controller{
   function _remap($action){
      //接收 http://xxx/index.php/yourController/$action
   }
}
页: [1]
查看完整版本: 遇到一個麻煩事情