Created
October 28, 2015 21:54
-
-
Save s-hiroshi/bcab59bd0a1221c7d38a 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
| /** | |
| * Get current page uri | |
| * | |
| * @return string current page uri. | |
| */ | |
| private function getUrl() { | |
| if ( isset( $_SERVER['HTTPS'] ) AND $_SERVER['HTTPS'] == 'on' ) { | |
| $uri = 'https://'; | |
| } else { | |
| $uri = 'http://'; | |
| } | |
| $uri .= $_SERVER["HTTP_HOST"]; | |
| $uri .= $_SERVER["PHP_SELF"]; | |
| return $uri; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment