好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CodeIgniter路由设置

在application/config/routes.php中添加路由规则。

 

$route['default_controller'] ='pages/view';//默认controller

$route['(:any)'] ='pages/view/$1';

//(:num) 匹配数字

//(:any) 匹配任意字符

$route['products/([a-z]+)/(\d+)'] ="$1/id_$2"

$route['404_override'] ='errors/page_missing';//设置处理错误的路由。

 

查看更多关于CodeIgniter路由设置的详细内容...

  阅读:61次