Jump to content

php includes


damiancds

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>)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...