Slight problem with the .php files calling on other files.
I have index.php, header.php and footer.php in the main folder, then have the css in a folder called 'css' and the images in a folder called 'img'.
Now the page works fine using relative paths (e.g. the header calls on "css/main.css"). However, if I create another .php file and put it in a new folder (e.g. test), I would call on the header and footer via:
<?php include '../header.php'; ?>
This works, but for some reason the css and images that the header calls don't work. It's as if they aren't being correctly 'pathed'.
My options seem to be:
Create a css and img folder for each sub folder which hold .php files, which defeats the whole point.
Keep all my .php files in the root folder.
Use absolute referencing (not keen on that, as it adds to file size, and makes changes more in depth).
Or am I doing something wrong?
One other thought.
Once I get the files created, I'll almost certainly want to have the title and meta tags within the head section different for each page. What's the best way to do this, given that my current global header calls from the Doctype declaration down to the first heading in the main body?