Last active
March 20, 2020 10:28
-
-
Save danleyb2/34fadce946512011b015dba7c7cacbab to your computer and use it in GitHub Desktop.
Php Include Header and Footer from a root
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
<header> | |
<h1> This is the heading </h1> | |
</header> |
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 | |
// Define DOC_ROOT as index.php file directory | |
DEFINE('DOC_ROOT', dirname(__FILE__)); | |
?> | |
<body> | |
<?php | |
include_once( DOC_ROOT.'/header.php'); | |
?> | |
<p> This is the Body. </p> | |
<?php | |
include_once(DOC_ROOT.'/footer.php'); | |
?> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment