Created
October 11, 2016 07:17
-
-
Save Panchev/bf85d0288f360f297c712a8ec122cea8 to your computer and use it in GitHub Desktop.
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
| function current_page_url() { | |
| $pageURL = 'http'; | |
| if ($_SERVER["HTTPS"] == "on") { | |
| $pageURL .= "s"; | |
| } | |
| $pageURL .= "://"; | |
| if ( $_SERVER["SERVER_PORT"] != "80" ) { | |
| $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; | |
| } else { | |
| $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