Snippet Name: Find the current URL of the page
Description: Finds the current URL of the page.
Comment: (none)
Language: PHP
Highlight Mode: PHP
Last Modified: March 01st, 2009
|
<?PHP
FUNCTION getCurrentPage() {
$thedomain .= "http://";
$thedomain .= $_SERVER['HTTP_HOST'];
$thedomain .= $_SERVER['REQUEST_URI'];
RETURN $thedomain ;
}
ECHO "The current URL is: ".getCurrentPage()."!";
?> |