contemporaneous Posted December 3, 2010 Share Posted December 3, 2010 So I've been trying to figure out where I'm going wrong with calling up separate html files into my php file. I was following the instructions for this procedure over at http://www.apaddedcell.com/how-automatically-include-your-header-navigation-and-footer-every-page and as far as I can tell, I've followed it to the letter; even to the extent of pasting their code in directly. This is my index.php code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Home page – My Website</title> <meta http-equiv="description" content="page description" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <style type=”text/css”>@import “styles.css”;</style> </head> <html> <body> <?php include(“includes/header.html”);?> <?php include(“includes/navigation.html”);?> This is the content of the page <?php include(“includes/footer.html”);?> </body> </html> In my particular exercise, I have the header and navigation in one file called header.html. This is the URL I'm testing it out on: http://dreamscapecreative.net/templates/index.php. It's supposed to pretty much look like this (focusing on the header/nav and footer http://dreamscapecreative.net/ Thanks in advance to anyone who'd like to chime in and tell me where I'm going wrong. It seemed pretty straightforward, from the tutorial. Is it something painfully obvious? Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted December 3, 2010 Share Posted December 3, 2010 It seemed pretty straightforward, from the tutorial. Is it something painfully obvious? change this... <?php include(“includes/header.html”);?> <?php include(“includes/navigation.html”);?> This is the content of the page <?php include(“includes/footer.html”);?> to this... <?php include("includes/header.html");?> <?php include("includes/navigation.html");?> This is the content of the page <?php include("includes/footer.html");?> and this... <style type=”text/css”>@import “styles.css”;</style> to this... <style type="text/css">@import "styles.css";</style> Quote Link to comment Share on other sites More sharing options...
contemporaneous Posted December 3, 2010 Author Share Posted December 3, 2010 MasterACE14: Thanks for the help -- and it did work, by the way -- but I can't for the life of me see any difference between the original code I had and your changes other than that yours is showing in red and mine's showing in blue. Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted December 3, 2010 Share Posted December 3, 2010 you had different double quotes, I'm not even sure how you type those ones to be honest Lol, but you just use " " Quote Link to comment Share on other sites More sharing options...
contemporaneous Posted December 3, 2010 Author Share Posted December 3, 2010 Yep, that was it. I'm not sure how it made a difference, either. I didn't think that would affect the raw code. Even looked the same. I spent all day trying to figure that out. lol. Thanks again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.