路由URL在CakePHP中包含一个井号

时间:2014-08-03 00:37:18

标签: jquery ajax cakephp routes url-routing

例如,当我在浏览器中输入example.com/#hello/view/123时,它会将我带到example.com。 #之后的所有内容都会被忽略。

如何在CakePHP中创建一个Route来处理带有哈希的URL?

1 个答案:

答案 0 :(得分:0)

井号已经在cakephp中有多个功能,但是使用'#'=>将'#subdirectory'添加到您的网址。 'subdirectory'会生成你可以实际使用的'#subdirectory'。 看看这个链接here