Sorry to barge in on the subject, however. Did you say index.html? Are you parsing your html documents as PHP, if not then that could be your problem. I know a lot of hosting providers do html over php priority meaning if you have index.html and index.php by default index.html will be displayed and also by default index.html cannot parse PHP thus doing a PHP include is useless.
Do a file check -> include method.
<?PHP
if(file_exists('./header.php')) {
require('./header.php');
} else {
print('Blah, this mutha couldn\'t find my header file :( please email me and let me know');
end; // You can also do exit;
}
?>
Logically you would do it all in .php or .html files you shouldnt mix extensions unless its .tpl files for templating but thats for a later date when you learn what smarty is 🙂
<?PHP
if(file_exists('./header.php')) {
require('./header.php');
} else {
print('Blah, this mutha couldn\'t find my header file :( please email me and let me know');
end; // You can also do exit;
}
// This is all my normal content :)
?>
<div>blah blah blah lets have a blah party</div>
<?PHP
if(file_exists('./footer.php')) {
require('./footer.php');
} else {
print('Blah, this mutha couldn\'t find my header file :( please email me and let me know');
end; // You can also do exit;
}
?>
Logic:
1.) Header.php includes all the main template header stuff, beginning global layout such as global wrapper, content wrapper and css files and Javascript.
2.) Content is what will change on a per page basis
3.) Footer.php includes the copyright and the ending of global layout stuff such as wrapper and content ends.