You misunderstood,but thank you all the same.
My problem is I need the url on browser in my php code.
I know javascript can get it, I want to know php can or not.
Or is there any way to get the variable in javacript?
Now I redirect the page to add the url variable,like:
<script>
var url=this.location.href.toLowerCase();
document.location.href='index.php?url='+url;
</script>
Then I analyse $url.
Is there any way to solve it in one file?