Created
March 20, 2012 02:02
-
-
Save verteb/2130011 to your computer and use it in GitHub Desktop.
PHP: get_current_page_url()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Retourne l'url de la page courante | |
| * @return string | |
| */ | |
| function get_current_page_url(){ | |
| return (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment