开发者

Capturing hash(#) from URL in CodeIgniter

I have a url that looks like

开发者_如何学Go

mysite.com/transactions/view/123456

which works fine.

however my client now wishes to have a hashbang in the url

mysite.com/transactions/view/#123456

Now the obvious issue here is that browsers treat the hashbang as an anchor directive.

Is there anyway to in code igniter allow the hashbang and have #123456 (or even just 123456) passed to the view function?


Is there anyway to in code igniter allow the hashbang and have #123456 (or even just 123456) passed to the view function?

Short of javascript, no. The browser simply doesn't send the 'fragment' portion of the URL to the server. PHP can only read it if javascript running after the page has rendered sends it in a second request.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜