Jump to content

Recommended Posts

Hey everyone:

 

I'm getting frustrated over here haha.  I have a site (http://www.12greatpeiexperiences.com) that just suddenly began experiencing something.  I have a set to run at the top of each page, but one day they just stopped displaying.  I'm having a feeling it started when I started configuring php settings to install

phpmyadmin?  Anyway, everything displays correctly in Dreamweaver - but when I visit the site in a browser, this header just doesn't display.  If you visit the site, you'll notice the big blue empty header up top.

 

Any ideas!?!?

 

Thanks a mil!

 

I should also mention that the code is red in dreamweaver...

 

include('common/header_tabs.php'); ?></td>

</tr>

</table>

</td>

 

<td width="25" rowspan="3" valign="top"><img src="images/right_side_empty.png" width="25" height="600" alt="" /></td>

</tr>

<tr>

<td valign="top"><table width="730" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="58" rowspan="2" valign="top" background="images/left_side_bkg.jpg" bgcolor="#FFFFFF"><img src="images/left_side.jpg" width="58" height="382" alt="" /> </td>

<td width="21" background="images/top_main_blue_bkg.jpg"><img src="images/top_left_blue.jpg" width="21" height="78" alt="" /></td>

<td width="627" background="images/top_main_blue_bkg.jpg" class="main_nav_blue">

<? include('common/blue_nav.php') ?>

Link to comment
https://forums.phpfreaks.com/topic/112602-include-function/
Share on other sites

Have you missed some of your code off the top post? Post the PHP code that includes the file that's missing. Have you tried using the file_exists() function to check the files still there? Also post the actual file that wont include.

 

Also, any code you post should be in between


tags.

Link to comment
https://forums.phpfreaks.com/topic/112602-include-function/#findComment-578292
Share on other sites

Sorry I'm hardly an expert - I'll post the code to the whole page and highlight the given areas:

 

<!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 name="verify-v1" content="M2mjShp7vDPjhmuH3M/o/21F+H/igWkge2XusPreuic=" />

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>12 Great PEI Experiences</title>

<link href="common/styles.css" rel="stylesheet" type="text/css" />

<script language="javascript1.1" src="common/scripts.js"></script>

</head>

 

<body>

<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td width="25" rowspan="3" valign="top"><img src="images/left_side_empty.png" width="25" height="600" alt="" /><br /></td>

<td width="550"><table width="600" border="0" cellspacing="0" cellpadding="0">

<tr>

<td colspan="2"><img src="images/top.jpg" width="730" height="20" alt="" /></td>

</tr>

<tr>

<td rowspan="2"><a href="/index.php"><img src="images/logo.jpg" alt="12 Great PEI Experiences" width="221" height="110" border="0" /></a></td>

<td><a href="/index.php"><img src="images/main_nav_home.jpg" alt="Home" width="46" height="31" border="0" /></a><img src="images/main_nav_separator.jpg" width="6" height="31" alt="" /><a href="/site_map.php"><img src="images/main_nav_sitemap.jpg" alt="Site Map" width="66" height="31" border="0" /></a><img src="images/main_nav_separator.jpg" width="6" height="31" alt="" /><a href="/contact_us.php"><img src="images/main_nav_contact.jpg" alt="Contact us" width="81" height="31" border="0" /></a><img src="images/main_nav_separator.jpg" width="6" height="31" alt="" /><a href="/about_us.php"><img src="images/main_nav_about.jpg" alt="About Us" width="68" height="31" border="0" /></a><img src="images/main_nav_separator.jpg" width="6" height="31" alt="" /><a href="/pei_map.php"><img src="images/main_nav_peimap.jpg" alt="PEI Map" width="62" height="31" border="0" /></a><img src="images/main_nav_right.jpg" width="162" height="31" alt="" /></td>

</tr>

<tr>

<td><a href="/index.htm"><img src="images/top_logo_s.jpg" alt="12 Great PEI Experiences" width="23" height="79" border="0" /></a><img src="images/top_curve.jpg" width="205" height="79" alt="" /><a href="http://www.theweathernetwork.com/" target="_blank"><img src="images/weather_network.jpg" alt="Weather network" width="107" height="79" border="0" /></a><img src="images/flowers.jpg" width="174" height="79" alt="" /></td>

</tr>

<tr>

<td colspan="2"><? include('common/header_tabs.php'); ?></td>

</tr>

</table>

</td>

<td width="25" rowspan="3" valign="top"><img src="images/right_side_empty.png" width="25" height="600" alt="" /></td>

</tr>

<tr>

<td valign="top"><table width="730" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="58" rowspan="2" valign="top" background="images/left_side_bkg.jpg" bgcolor="#FFFFFF"><img src="images/left_side.jpg" width="58" height="382" alt="" /> </td>

<td width="21" background="images/top_main_blue_bkg.jpg"><img src="images/top_left_blue.jpg" width="21" height="78" alt="" /></td>

<td width="627" background="images/top_main_blue_bkg.jpg" class="main_nav_blue"><? include('common/blue_nav.php') ?></td>

<td width="21" align="right" background="images/top_main_blue_bkg.jpg"><img src="images/top_right_blue.jpg" width="21" height="78" alt="" /></td>

<td width="21" rowspan="2" align="right" valign="top" background="images/right_side_bkg.jpg" bgcolor="#FFFFFF"><img src="images/right_side.jpg" width="21" height="382" alt="" /></td>

</tr>

<tr>

<td height="304" valign="top" class="main_area_blue"> </td>

<td valign="top" class="main_area_blue">

<img src="images/12Great_header.jpg" alt="12 Great PEI Experiences" class="header_img" />

<table border="0" align="right" cellpadding="2" cellspacing="5">

  <tr>

    <td><img src="images/DonGroom.jpg" alt="Don Groom" align="right" /></td>

  </tr>

</table>

<p><span class="header_blue">Welcome to Prince Edward Island</span>, where colourful landscapes, friendly  faces, and rich heritage are bountiful. <br />

  <br />

  Your visit to Prince Edward  Island will provide you with many memories and unique Island  experiences that will last a lifetime.<br />

                      <br />

                      As an operator of restaurants and dinner theatres for over thirty-five  years, I have selected what I believe to be great experiences

in attractions, theatres, restaurants, and shops & services of  Prince Edward Island. I invite you to use the 12 GREAT PEI EXPERIENCES  website as your guide to Prince Edward Island.<br />

<br />

I hope you enjoy these Great PEI Experiences while you visit our Island.<br />

<br />

Don Groom<br />

President, 12 Great PEI Experiences</p>

</td>

  <td class="main_area_blue"> </td>

  </tr>

<tr>

<td width="58" rowspan="2" valign="top" bgcolor="#FFFFFF"><img src="images/left_side_bottom.jpg" width="58" height="58" /></td>

<td height="21" valign="bottom" bgcolor="#FFFFFF"><? include('common/flower.php'); ?><img src="images/bottom_left_curve.jpg" width="21" height="22" alt="" /></td>

<td valign="bottom" bgcolor="#FFFFFF"> </td>

<td valign="bottom" bgcolor="#FFFFFF"><img src="images/bottom_right_curve.jpg" width="21" height="22" alt="" /></td>

<td width="21" rowspan="2" align="right" valign="top" bgcolor="#FFFFFF"><img src="images/right_side_bottom.jpg" width="21" height="58" /></td>

</tr>

<tr>

<td height="36"><img src="images/bottom_left.jpg" width="21" height="36" alt="" /></td>

<td height="36" background="images/bottom_bkg.jpg"><a href="/refer_a_friend.php"><img src="images/refer.jpg" alt="" width="77" height="36" border="0" /></a><img src="images/spacer.gif" width="164" height="36" alt="" /><a href="http://www.revolution.ca" target="_blank"><img src="images/revolution.jpg" alt="" width="97" height="36" border="0" /></a><img src="images/spacer.gif" width="164" height="36" alt="" /><a href="#" onClick="bookmark('http://www.12greatpeiexperiences.com/','12 Great PEI Experiences')"><img src="images/bookmark.jpg" alt="" width="105" height="36" border="0" /></a></td>

<td><img src="images/bottom_right.jpg" width="21" height="36" alt="" /></td>

</tr>

</table></td>

</tr>

</table>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">

</script>

<script type="text/javascript">

_uacct = "UA-2947791-4";

urchinTracker();

</script>

</body>

</html>

 

 

File to include:

<a href="/shop_services/Anne_Chocolates.php" class="top_nav">Anne of Green Gables Chocolates</a> | <a href="/shop_services/Anne_Store.php" class="top_nav">Anne of Green Gables Store</a> | <a href="/shop_services/Bargain_Fabric_Outlet.php" class="top_nav">Bargain Fabric Outlet </a><br />

<a href="/shop_services/Cows.php" class="top_nav">Cows</a> | <a href="/shop_services/Cruise_Manada.php" class="top_nav">Cruise Manada</a> | <a href="/shop_services/Dunes_Studio.php" class="top_nav">The Dunes Studio Gallery and Café</a> | <a href="/shop_services/Founders_Hall.php" class="top_nav">Founders' Hall</a> | <a href="/shop_services/Northumberland_Ferries.php" class="top_nav">Northumberland Ferries</a><br />

<a href="/shop_services/Paderno.php" class="top_nav">Paderno Cookware</a>

</a>| <a href="/shop_services/Peakes_Wharf.php" class="top_nav">Peake’s Wharf Historic Merchants</a> | <a href="/shop_services/Rodd_Spa.php" class="top_nav">Rodd Spa Boutique</a> | <a href="/shop_services/Spinnakers_Landing.php" class="top_nav">Spinnaker’s Landing</a>

Link to comment
https://forums.phpfreaks.com/topic/112602-include-function/#findComment-578299
Share on other sites

1st file (blue_nav.php):

<a href="/shop_services/Anne_Chocolates.php" class="top_nav">Anne of Green Gables Chocolates</a> | <a href="/shop_services/Anne_Store.php" class="top_nav">Anne of Green Gables Store</a> | <a href="/shop_services/Bargain_Fabric_Outlet.php" class="top_nav">Bargain Fabric Outlet </a><br />
<a href="/shop_services/Cows.php" class="top_nav">Cows</a> | <a href="/shop_services/Cruise_Manada.php" class="top_nav">Cruise Manada</a> | <a href="/shop_services/Dunes_Studio.php" class="top_nav">The Dunes Studio Gallery and Café</a> | <a href="/shop_services/Founders_Hall.php" class="top_nav">Founders' Hall</a> | <a href="/shop_services/Northumberland_Ferries.php" class="top_nav">Northumberland Ferries</a><br />
<a href="/shop_services/Paderno.php" class="top_nav">Paderno Cookware</a>
</a>| <a href="/shop_services/Peakes_Wharf.php" class="top_nav">Peake’s Wharf Historic Merchants</a> | <a href="/shop_services/Rodd_Spa.php" class="top_nav">Rodd Spa Boutique</a> | <a href="/shop_services/Spinnakers_Landing.php" class="top_nav">Spinnaker’s Landing</a>

 

2nd file (header_tabs.php):

<a href="/index.htm"><img src="/images/top_logo_x.jpg" alt="12 Great PEI Experiences" width="244" height="30" border="0" /></a><a href="/Attractions_Theatres/"><img src="/images/Attractions.jpg" alt="Attractions & Theatres" width="129" height="30" border="0" /></a><img src="/images/A_R_nav_separator.jpg" width="11" height="30" alt="" /><a href="/restaurants/"><img src="/images/restaurants.jpg" alt="Restaurants" width="129" height="30" border="0" /></a><img src="/images/R_S_nav_separator.jpg" width="11" height="30" alt="" /><a href="/shop_services/"><img src="/images/shops.jpg" alt="Shops & Services" width="129" height="30" border="0" /></a><img src="/images/right_nav.jpg" width="77" height="30" alt="" />

 

3rd page (contact_us.php)

<?
if(isset($_POST['oncethrough'])){
	if(trim($_POST['cName']) != "" && trim($_POST['cEmail']) != ""){
		if(ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $_POST["cEmail"])){
			$Name = $_POST['cName'];

			$to = "rrogers@pei.aibn.com";

			$from = $_POST['cEmail']; 

			ini_set('sendmail_from', $from);

			$subject = "12 Great PEI Experiences - Contact Form";

			$body = "Name: ".$_POST['cName']."\nEmail Address: ".$_POST['cEmail']."\n";
			$body .= "Street: ".$_POST['cStreet']."\nProvince/State: ".$_POST['cProv']."\n";
			$body .= "Country: ".$_POST['cCountry']."\nPostal Code: ".$_POST['cPostal'];
			$body .="\n\nHow did you find us: \n".$_POST['cFindUs'];
			$body .="\n\nComments: \n".$_POST['cComments'];

			mail($to, $subject, $body, "From: $from"); 
			// in order: recipient, subject, message 
			$error = "sent";
		}else{
			$error = "Please fill in a valid email address.";
		}
	}else{
		$error = "Please fill in your name and email address.";
	}
}
?>
<!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=iso-8859-1" />
<title>Contact us</title>
<link href="common/styles.css" rel="stylesheet" type="text/css" />
<script language="javascript1.1" src="common/scripts.js"></script>
</head>

<body>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
	<td width="25" rowspan="3" valign="top"><img src="images/left_side_empty.png" width="25" height="600" alt="" /></td>
	<td width="550"><table width="600" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td colspan="2"><img src="images/top.jpg" width="730" height="20" alt="" /></td>
			</tr>
			<tr>
				<td rowspan="2"><a href="/index.php"><img src="images/logo.jpg" alt="12 Great PEI Experiences" width="221" height="110" border="0" /></a></td>
				<td><a href="/index.php"><img src="images/main_nav_home.jpg" alt="Home" width="46" height="31" border="0" /></a><img src="images/main_nav_separator.jpg" width="6" height="31" alt="" /><a href="/site_map.php"><img src="images/main_nav_sitemap.jpg" alt="Site Map" width="66" height="31" border="0" /></a><img src="images/main_nav_separator.jpg" width="6" height="31" alt="" /><a href="/contact_us.php"><img src="images/main_nav_contact.jpg" alt="Contact us" width="81" height="31" border="0" /></a><img src="images/main_nav_separator.jpg" width="6" height="31" alt="" /><a href="/about_us.php"><img src="images/main_nav_about.jpg" alt="About Us" width="68" height="31" border="0" /></a><img src="images/main_nav_separator.jpg" width="6" height="31" alt="" /><a href="/pei_map.php"><img src="images/main_nav_peimap.jpg" alt="PEI Map" width="62" height="31" border="0" /></a><img src="images/main_nav_right.jpg" width="162" height="31" alt="" /></td>
			</tr>
			<tr>
				<td><a href="/index.htm"><img src="images/top_logo_s.jpg" alt="12 Great PEI Experiences" width="23" height="79" border="0" /></a><img src="images/top_curve.jpg" width="205" height="79" alt="" /><a href="http://www.theweathernetwork.com/" target="_blank"><img src="images/weather_network.jpg" alt="Weather network" width="107" height="79" border="0" /></a><img src="images/flowers.jpg" width="174" height="79" alt="" /></td>
			</tr>
			<tr>
				<td colspan="2"><? include('common/header_tabs.php'); ?></td>
			</tr>
		</table>
	</td>
	<td width="25" rowspan="3" valign="top"><img src="images/right_side_empty.png" width="25" height="600" alt="" /></td>
</tr>
<tr>
	<td valign="top"><table width="730" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td width="58" rowspan="2" valign="top" background="images/left_side_bkg.jpg" bgcolor="#FFFFFF"><img src="images/left_side.jpg" width="58" height="382" alt="" /></td>
			<td width="21" background="images/top_main_blue_bkg.jpg"><img src="images/top_left_blue.jpg" width="21" height="78" alt="" /></td>
			<td width="627" background="images/top_main_blue_bkg.jpg" class="main_nav_blue"><? include('common/blue_nav.php') ?></td>
			<td width="21" align="right" background="images/top_main_blue_bkg.jpg"><img src="images/top_right_blue.jpg" width="21" height="78" alt="" /></td>
			<td width="21" rowspan="2" align="right" valign="top" background="images/right_side_bkg.jpg" bgcolor="#FFFFFF"><img src="images/right_side.jpg" width="21" height="382" alt="" /></td>
		</tr>
		<tr>
			<td height="304" valign="top" class="main_area_blue"> </td>
		  <td valign="top" class="main_area_blue">
				<img src="images/Contact_Us.jpg" height="38" width="299" alt="Shops & Services" class="header_img" /><br />
				<br />
		<? if($error == "sent"){ ?>
			<div align="right">Thank you, the form has been submitted.</div>
		<? }else{?>
			<form name="contact" action="<?=$_SERVER['PHP_SELF']?>" method="post">
				<input type="hidden" name="oncethrough" value="true" />
			    <table width="217" align="right" class="main_text">
					<? if(trim($error != "")){?>
						<tr>
							<td colspan="2" style="color:#FF0000"><?=$error?></td>
						</tr>
					<? }?>
					<tr>
						<td width="45"><b>Name:</b></td>
						<td width="167"><input name="cName" type="text" class="main_text" value="<?=$_POST['cName']?>" size="30" /></td>
					</tr>
					<tr>
						<td><b>Email:</b></td>
						<td><input name="cEmail" type="text" class="main_text" value="<?=$_POST['cEmail']?>" size="30" /></td>
					</tr>
					<tr>
						<td><b>Street:</b></td>
						<td><input name="cStreet" type="text" class="main_text" value="<?=$_POST['cStreet']?>" size="30" /></td>
					</tr>
					<tr>
						<td><b>Province/State:</b></td>
						<td><input name="cProv" type="text" class="main_text" value="<?=$_POST['cProv']?>" size="30" /></td>
					</tr>
					<tr>
						<td><b>Country:</b></td>
						<td><input name="cCountry" type="text" class="main_text" value="<?=$_POST['cCountry']?>" size="30" /></td>
					</tr>
					<tr>
						<td><b>Postal Code:</b></td>
						<td><input name="cPostal" type="text" class="main_text" value="<?=$_POST['cPostal']?>" size="30" /></td>
					</tr>
					<tr><td colspan="2">How did you find us? :</td></tr>
					<tr><td colspan="2"><textarea name="cFindUs" cols="30" rows="5" class="main_text"><?=$_POST['cFindUs']?></textarea></td></tr>
					<tr><td colspan="2">Comments:</td></tr>
					<tr><td colspan="2"><textarea name="cComments" cols="30" rows="5" class="main_text"><?=$_POST['cComments']?></textarea></td></tr>

					<tr><td> </td><td><input type="submit" name="Submit" value="Submit" /></td></tr>
				</table>
			</form>
		<? }?>
		<span class="header_blue">12 Great PEI Experiences</span><br />
		  PO Box 1418, Summerside, PE<br />
		  C1N 4K2
		  <p>Tel: 1.902.436.0029<br />
		  Fax: 1.902.888.3860</p>

		  <table width="145" border="0">
                <tr>
                  <td width="139" height="80"><p align="center"><img src="images/don.jpg" alt="Don Groom" width="83" height="123" align="middle" /></p>
                    <p align="center">Don Groom <br />
                      President<br />
                  <a href="mailto:dgroom@12greatpeiexperiences.com">dgroom@12greatpeiexperiences.com</a></p></td>
                </tr>
                <tr>
                  <td height="98"><p align="center"><img src="images/justin.jpg" alt="Justin Doiron" width="83" height="123" align="middle" /></p>
                    <p align="center">Justin Doiron <br />
                      Marketing & PR <br />
		          <a href="mailto:jdoiron@12greatpeiexperiences.com">jdoiron@12greatpeiexperiences.com</a></p></td>
                </tr>
              </table>
		  <br /></td>
			<td class="main_area_blue"> </td>
	  </tr>
		<tr>
			<td width="58" rowspan="2" valign="top" bgcolor="#FFFFFF"><img src="images/left_side_bottom.jpg" width="58" height="58" /></td>
			<td height="21" valign="bottom" bgcolor="#FFFFFF"><? include('common/flower.php'); ?><img src="images/bottom_left_curve.jpg" width="21" height="22" alt="" /></td>
			<td valign="bottom" bgcolor="#FFFFFF"> </td>
			<td valign="bottom" bgcolor="#FFFFFF"><img src="images/bottom_right_curve.jpg" width="21" height="22" alt="" /></td>
			<td width="21" rowspan="2" align="right" valign="top" bgcolor="#FFFFFF"><img src="images/right_side_bottom.jpg" width="21" height="58" /></td>
		</tr>
		<tr>
			<td height="36"><img src="images/bottom_left.jpg" width="21" height="36" alt="" /></td>
			<td height="36" background="images/bottom_bkg.jpg"><a href="/refer_a_friend.php"><img src="images/refer.jpg" alt="" width="77" height="36" border="0" /></a><img src="images/spacer.gif" width="164" height="36" alt="" /><a href="http://www.revolution.ca" target="_blank"><img src="images/revolution.jpg" alt="" width="97" height="36" border="0" /></a><img src="images/spacer.gif" width="164" height="36" alt="" /><a href="#" onClick="bookmark('http://www.12greatpeiexperiences.com/','12 Great PEI Experiences')"><img src="images/bookmark.jpg" alt="" width="105" height="36" border="0" /></a></td>
			<td><img src="images/bottom_right.jpg" width="21" height="36" alt="" /></td>
			</tr>
	</table></td>
</tr>
</table>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2947791-4";
urchinTracker();
</script>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/112602-include-function/#findComment-578309
Share on other sites

            <td width="627" background="images/top_main_blue_bkg.jpg" class="main_nav_blue"><? include('common/blue_nav.php') ?></td>

 

Missing A ;

 

            <td width="627" background="images/top_main_blue_bkg.jpg" class="main_nav_blue"><? include('common/blue_nav.php'); ?></td>

Link to comment
https://forums.phpfreaks.com/topic/112602-include-function/#findComment-578317
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.