[PHP] get the current URL (url de la page en cours)

public static function getCurrentUrl() {
      return (!empty($_SERVER['HTTPS']) ? "https://" : "http://" ) . $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
}

categorie: