问题描述
|
为了重写URL,我使用$ route [\'controller / function name /([[a-z] +)\'] = \'controller / function name / $ 1 \';
在codeigniter中,我的问题是还要带小写大写字母和空格,这怎么可能。
解决方法
CodeIgniter在捕获括号内使用正则表达式。添加不区分大小写的字母和空格将如下所示:
$route[\'controller/function_name/([a-zA-Z\\s]+)\'] = \'controller/function_name/$1\';