如何获得服务器端语言的散列? [英] How to get hash in a server side language?
问题描述
在PHP中,打印我们的< $ _ $ SERVER 变量没有任何有关哈希的内容
这是否真的可以在其他服务器端语言中使用?
<解决方案
在PHP中,打印我们的< $ _ $ SERVER 变量没有任何有关哈希的内容
这是否真的可以在其他服务器端语言中使用?
As far as I know, there's no way to get url hash in a server side language since hash urls are not being sent to the server side. One of my co-workers told me that it should be possible in java (jsp) or Ruby. Since I tested it on PHP, but it simply doesn't work. I googled about ruby and jsp, but had no luck. He also mentioned that the first access (http://domain.com/index.php#test ) is accessible from a server side.
in PHP, printing our $_SERVER variable doesn't have anything about hash
Is this really possible in other server side languages?
Short answer: no, it's a client side only thing.
Slightly longer: It's called Fragment identifier and is client side only - browser doesn't send that part of the url to the server. It's not possible in any language unless you are using some browser implementation (or software) which would send that part of url to the server. Reference: http://en.wikipedia.org/wiki/Fragment_identifier
这篇关于如何获得服务器端语言的散列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!