Home php How to get current page url in PHP?

How to get current page url in PHP?

by Shahriar Sagor

Today now in this post i will show you How to get current page url in PHP? Whenever we need to get actual page url in Raw PHP then we can do this by using this post. Here I will give you the example that way we can get this easily current URL in PHP application. By using Following PHP code through we can get this:

Example:

$currentLink = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
print_r($currentLink);

Read Also : How to convert Object into Array in PHP?

Thanks for read. I hope it help you. For more you can follow us on facebook.

close

You may also like