CodeIgniter路由特殊字符(CodeIgniter Routing special characters)
我正在尝试使用特殊字符编写CodeIgniter:
somepage.com/something#somethingelseroutes.php中的定义是:
$route['(:any)#(:any)'] = 'eshop/eshop/individual/$1/$2';但它会引发我的错误:
消息:preg_match():未知修饰符'('
你有这方面的经验吗? 谢谢
I'm trying to make CodeIgniter with special character:
somepage.com/something#somethingelseDefinition in routes.php is:
$route['(:any)#(:any)'] = 'eshop/eshop/individual/$1/$2';but it throws me error:
Message: preg_match(): Unknown modifier '('
Do you have any experience with this? Thank you
最满意答案
只要:
$route['(:any)'] = 'eshop/eshop/individual/$1';在Javascript之后:
var hash = window.location.hash.substr(1);Only:
$route['(:any)'] = 'eshop/eshop/individual/$1';After in Javascript:
var hash = window.location.hash.substr(1);更多推荐
发布评论