Created
September 12, 2015 00:33
-
-
Save wisecrab/b66380d80a65fb74420a 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
//echo the current filename | |
echo basename(__FILE__); | |
//echo current filename without extension | |
echo basename(__FILE__, '.php'); | |
//Echo the current URL | |
echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment