如何在codeigniter中路由链接?

时间:2013-04-09 20:29:13

标签: php codeigniter

我有以下链接:

www.example.com/index.php/comanda_plasata/send_email/0347046098

我希望它显示为www.example.com/index.php/send_email

我该如何实现这一目标?

1 个答案:

答案 0 :(得分:1)

$route['send_mail/(:any)'] = "comanda_plasata/send_email/$1"; 

或者如果您更喜欢只允许整数

 $route['send_mail/(:num)'] = "comanda_plasata/send_email/$1"; 

但请阅读f ..抱歉CI doc