brianjw Posted July 22, 2010 Share Posted July 22, 2010 Alright, so my goal is to try and include a header.php file which will have the banner at the top, and all the navigation the the site. That way every page with the <?php include 'header.php'; ?> in it will have a fully and easily updated navigation and banner. Header.php has this in it: <div id="bannertopp" class="profile-banner-box"> <map name='imgmap'><area shape='circle' coords='916,57,31'href='http://www.youtube.com/subscription_center?add_user=#' target='_blank'/><area shape='circle' coords='832,58,31'href='http://www.twitter.com/#' target='_blank'/><area shape='rect' coords='279,5,607,88'href='#'/><area shape='circle' coords='746,57,31'href='http://www.facebook.com/#' target='_blank'/></map> <img usemap="#imgmap" src="images/spacer.png" height="90" width="960" alt=""> </div> <table width="100%"><tr><td width="3"> </td><td width="364"> <img src="images/box.png" alt="" /></td><td width="111"><a id="homebt" href="#" title="Home"><span>Home</span></a></td><td width="76"><a id="aboutbt" href="#" title="About"><span>About</span></a></td><td width="64"><a id="jailbreakbt" href="#" title="Jailbreak"><span>Jailbreak</span></a></td><td width="70"><a id="downloadbt" href="#" title="Download"><span>Download</span></a></td><td width="240"><a id="contactbt" href="#" title="Contact"><span>Contact</span></a></td></tr></table> The actual file containing the include code has this code: (named index.php) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="channel-base-div"> <?php include 'header.php'; ?> <div class="content">.... Now for my problem. Dreamweaver CS5 includes the php just fine. The header displays on the index page through the php include. (yes dreamweaver can do this now). However, while testing in Firefox, all of the contents in header.php aren't included at all. I've posted the code. I've double checked, I've googled. I can't think of what may be wrong here. I'm not getting any errors, both files are named with a php extension. I'm stumped. Any ideas? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted July 22, 2010 Share Posted July 22, 2010 When testing in FF, what URL are you entering in the browser's address bar? Quote Link to comment Share on other sites More sharing options...
brianjw Posted July 23, 2010 Author Share Posted July 23, 2010 I am doing this locally right now, so: file:///C:/Users/###/Documents/###/index.php (Windows 7) I probably sound pretty stupid... I might have solved my own problem, but you tell me, cause I'm not sure. It's probably because I don't have PHP installed, like it is on the hosting account which is why it doesn't process php? So I should download one of those local test site things that come with mysql and php to test it locally right? lol Just checking, I think thats the reason. But just making sure... Quote Link to comment Share on other sites More sharing options...
Alex Posted July 23, 2010 Share Posted July 23, 2010 Yes, that's why. You should install something like WAMP locally for development purposes. Quote Link to comment Share on other sites More sharing options...
brianjw Posted July 23, 2010 Author Share Posted July 23, 2010 Ok, thanks for the help and recommendation of the software. Downloading it now.. 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.