Get full page url from PHP
I'm trying to get the entire url of a page as a string in PHP, so if the requested url ./foo.php?arg1=test&arg2=test2
is what I get "./foo.php?arg1=test&arg2=test2"
.
I know I can get ./foo.php
some of $_SERVER
and variables from $_GET
, but I was wondering if there is an easy way to do this in one fell swoop.
TIA.
+2
source to share
3 answers