在我的代码点火器项目中,我想在任何中使用带通配符的两个字符
$route['(school*)/(:any)'] = 'Schools/static_school/$1/$2';
这不起作用。
我想创建一个类似domain.com/schoolTesting/urlofschool
的url类似地,另一个记录可以是
domain.com/schoolWorking/urlofschool
希望这将帮助您:
$route['school(:num)/(:any)'] = 'Schools/url-of-school/$1';
访问url
应该是这样的:
www.domain.com/school1613001/town-south-school
你的Schools
控制器的方法应该是这样的:
public function town_south_school()
{
echo "string";
}