douwen5546
douwen5546
2014-09-04 19:47

正则表达式中的路由问题

  • regex
  • codeigniter
  • php
已采纳

Problem is i have two routes

$route['management/(:any)'] = 'mycontroller/home/$1'; $route['management/(:any)/contact'] = 'mycontroller/contact/$1';

First route is working properly but second is not working. can any one please guide me i am using codeigniter framework.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • donglian3055 donglian3055 7年前

    Try switching the order in which you write them. The first one is probably catching that route, so it's never making it to the second one.

    点赞 评论 复制链接分享