Skip to content

Instantly share code, notes, and snippets.

@danleyb2

danleyb2/footer.php

Last active Mar 20, 2020
Embed
What would you like to do?
Php Include Header and Footer from a root
<header>
<h1> This is the heading </h1>
</header>
<?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