Skip to content

Instantly share code, notes, and snippets.

@micc83
Created June 27, 2013 09:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micc83/5875231 to your computer and use it in GitHub Desktop.
Save micc83/5875231 to your computer and use it in GitHub Desktop.
Current page url
<?php
/**
* RITORNA L'URL CORRENTE
*/
function curPageURL() {
$pageURL = 'http';
if ( isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") $pageURL .= "s";
$pageURL .= "://";
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
return $pageURL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment