Jump to content

Simple Include Problem


brianjw

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.