What is the difference between $_SERVER['QUERY_STRING'] and $_SERVER['REQUEST_URI'] in PHP?
$_SERVER['QUERY_STRING'] contains the query string portion of the URL, which includes the parameters passed to the script. On the other hand, $_SERVER['REQUEST_URI'] contains the URI which was given in order to access the page. If you want to get the full URL including the query string, you can concatenate $_SERVER['REQUEST_URI'] and $_SERVER['QUERY_STRING'].
$fullUrl = $_SERVER['REQUEST_URI'] . '?' . $_SERVER['QUERY_STRING'];
echo $fullUrl;