开发者

Using Wildcards in CodeIgniter

Wild开发者_开发技巧cards are cool.

I am trying to do this:

$route["(:any)/controller"] = "controller";

basically, I want to put the wildcard in the front. It doesn't quite work, and I don't know any work around.


Should work. If it doesn't try shuffling around your route definitions to put the wildcard line at the end.

Also I don't think you need the parenthesis around :any.


using regular expressions did the trick.. thank you for pointing out (:any) is greedy!

$route['([a-z_A-Z]+)/controller'] = 'controller';
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜