Created
June 3, 2010 15:53
-
-
Save jpsirois/424055 to your computer and use it in GitHub Desktop.
Always Return the current file "real document root" in PHP
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
<? | |
# This return the current file "real document root" | |
$root = str_replace($_SERVER['SCRIPT_NAME'],'',$_SERVER['SCRIPT_FILENAME']).'/'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment