How to get current page url in PHP?

Share Me
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

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.

About code chef

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by code chef →