Jump to content

php includes


damiancds
 Share

Recommended Posts

The way I've set up my site is through includes, where I'll have my content page, let's say the home page, index.phpand index.php includes the header.php, sidebar.php, and footer.phpthe thing I'm curious about is that in my header.php is where I've done the doctype and the html, title, head, and starting body tags are, and in my footer is where they're endedshould it be setup that I declare my html, title and whatnot in the content page (index.php) then include header and footer and close them in the content page or is it alright to keep it the way it isI'm thinking I might have to switch them because I'll eventually be doing meta tags and other things and it might be better in the long runany input would be appreciated,thanks

Link to comment
Share on other sites

after you're page renders in a browser (after all the includes have loaded) is what the validator would see, and validate against. In other words, when you view source index.php, does it look like a normal page? I would put the DTD, title and opening body tags right outside the start of your PHP code (which I'm guessing would be include(header) and after where the footer include is, put closing tags, etc (</body>, </html>)

Edited by thescientist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...