php - Getting URL in variable including internal link -


i getting current page url in variable using following code.

echo $url=$_server["server_name"].$_server["request_uri"]; // result: mywebsite/webpage.php 

everything goes till here. webpage.php has internal links. make url this

http://mywebsite/webpage.php#fragment-1 

so when user on page , refresh page. need have fragment-1 in result shows same result earlier. how can '#fragment-1' value url ?

you can't. hashes not sent web server.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -