Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


php_tricks

This is an old revision of the document!


# the entire URL of the current page, including query string

$url = $_SERVER['REQUEST_URI'];

# the base URL of the current page without query string

$url_base = $_SERVER['PHP_SELF'];

More info on parsing the URL: http://php.net/manual/en/function.parse-url.php

php_tricks.1407447090.txt.gz · Last modified: 2014/08/07 17:31 by juckins