Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

someone here in SO told me that the hash (#) in the url could be retrieved by php function parse_url? is this true?

my web site got a lot of ajax effects and i want to be able to pass an url with a hash to the index.php so it could display the information based on the hash values.

eg. if a user clicks and navigates in my website and he found a thing he wants to share, then he could copy the address and send it to his friend and when this person enters he sees the same thing.

i have tried using javascript to save the hash values in cookies but that isnt working with firefox and its too slow in safari (the html will show first, so one has to refresh the page a second time for the correct content to be shown).

any other solution is welcome

EDIT: im very confused..if i use the parse_url i have to type the url myself in php to get the hash? what is the point then...my question if whether my pal can enter the url with # values and php could process it? it seems like a no, am i right?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
157 views
Welcome To Ask or Share your Answers For Others

1 Answer

The hash in the URL doesn't even get to the server. There is no way you can access it from any programming language on the server side.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...