Created
January 9, 2013 15:23
-
-
Save DannyNunez/4493954 to your computer and use it in GitHub Desktop.
Set variable for server root to include path globally to your sites.
This file contains 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
<?php | |
$new_root = explode('/',$_SERVER['DOCUMENT_ROOT']); | |
array_pop($new_root); | |
include_once(implode('/',$new_root).'path to file'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment