How to get current page URL in PHP?

Posted by Prem Tiwari | Updated on

Answer: Use the PHP $_SERVER Superglobal Variable

If you want to get current page URL using PHP programming language. Use the following PHP code to get current page URL:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers