So I’m having some trouble with the php include function, my guess is I’m just not good enough with PHP to know what I am messing up so please don’t make fun of me!
Okay here is my trouble…I’m trying to include a header and footer on every page of my site. So I’m trying to use this line of code to make this happen(with both the header and footer:
<?php include ('/header.php'); ?>
Now it works great with my index file in my sites home directory, but when I include it into page that isn’t in the home directory(i.e /about) it throws out an error that says there is no such file and that is failed to open. What did I miss or what do I have to make this work so the header and footer files say in one directory that I can load/include into all other pages through the site?
Also, how can I make sure that my page titles I have set up stay in place? If I include just the one header all the page titles will be the same, so how can I get around that and still have page title that are more descriptive to the page the visitor is viewing?
Thanks.