How to get current page URL in php

0

If Current url is https://phpgurukul.com/how-to-get-current-page-url-in-php/

Output :
/how-to-get-current-page-url-in-php/REQUEST_URI  return only  root website folder instead of returning full page.
if you want actual link then use this syntax
Output :
https://phpgurukul.com/how-to-get-current-page-url-in-php/ In the above code $_SERVER[‘HTTP_HOST’] return the  domain name through which the current request is being fulfilled.
Tags

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.