-
-
Save RKAN/6040364 to your computer and use it in GitHub Desktop.
//gets the path to your root directory of your site
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
<?php | |
$path = $_SERVER['DOCUMENT_ROOT']; //gets the path to your root directory of your site | |
//now all links instead of being: | |
// (images/index.php) and have it be different across all pages, use this: | |
include_once ($path . '/layout/footer.php'); //and it is now universal across all pages | |
//found at: http://css-tricks.com/php-include-from-root/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment