Jump to content

php includes


catfish

Recommended Posts

Hello, I have just completed an update for a client I previously designed for. I decided the menu was getting bigger and/or changing regularly so I changed it to use the php include statement for the menu section. All pages were changed to end in php. I tested all the pages numerous time with my dreamweaver, view in browser and all looks good. Yesterday I upload all the files but the menu is not showing. I wondered if the server was taking time to make the changes of the new file (resolving as they say).

 

I wonder if anyone has any ideas or recommendations. The website is http://www.comserv.org/

 

Thankyou

Link to comment
Share on other sites

When I click your link, I see your 'file tree' - what usually shows up if there is no index file. And when I open your index.php via that tree directly, I don't get a website, only see the actual code.

 

I wonder if your host may not support php?

Link to comment
Share on other sites

Now the site is there, but all the pages are .html - was I right with my guess?

Thanks for your help. Initially I thought you were probably correct so this morning I uploaded the original index.html to see what would happen (because I am new to php and the include thing) The server is shaw which I don't know if you are familiar with where you are. Then I remembered that I had recently done the same thing with another clients site using the includes for his menu and he is also with shaw and has no problem so I am stumpted. ???

 

This is my codes

<div id="header">
<img src="images/upper_left.jpg" width="30" height="30" alt="Corner Left" style="float: left;" />
<img src="images/upper_right.jpg" width="30" height="30" alt="Corner Right" style="float: right;" />
<a href="index.html" title="Cowichan Lake Community Services"><img class="logo" src="images/sm-logo.png" width="180" height="140" alt="Cowichan Community Services" /></a>
<h1>Cowichan Lake Community Services</h1>
<span class="h1">Box 670, 121 Point Ideal Rd,<br />Lake Cowichan, BC<br />
  250 749-6822</span>  </div>
<div id="body">
 <div id="header_photo" class="hdr-volunteer">
  <img class="sign" src="images/rightbox_sign.png" width="264" height="247" alt="" />
  	</div>
<div>

and the include file
[code]<div id="nav-strip">
<div id="nav">
<ul id="pmenu">
<li class="tc"><a href="index.php">Home <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="about-us.php" class="enclose">About CLCS</a></li>	
</ul>
</li>
<li class="tc"><a href="counselling.php">Counselling
 <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>


<li class="fly"><a href="counselors.php">Our Counsellors<!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
		<ul>

				<li><a href="./counselors.php#amanda">Amanda Sawatzky</a>
			</li><!--[if lte IE 6]></td></tr></table></a><![endif]-->
			<li><a href="./counselors.php#darlene">Darlene Tully </a></li>
			<li><a href="./counselors.php#brandon">Brandon Riopka</a>
			</li>
			<!--[if lte IE 6]></td></tr></table></a><![endif]-->		
		  </ul>
				<!--[if lte IE 6]></td></tr></table></a><![endif]-->

		</li>
		<li><a href="./counselling.php#resources">Resources</a></li>
	  </ul>
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="tc"><a href="programs.php">Programs <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="adult-programs.php" class="enclose">Adult Programs</a></li>
<li><a href="parenting-programs.php">Family  Programs</a></li>
<li><a href="youth-programs.php">Youth Programs</a></li>
<li><a href="out-reach.php">Outreach Team</a></li>	
</ul>

</li>
<li class="tc"><a href="services.php">Other Services  <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>


<li><a href="hampers.php">Christmas Hampers</a></li>
<li><a href="meals-on-wheels.php">Meals on Wheels</a></li>
<li><a href="loan-cupboard.php">Red Cross Loans</a></li>
<li><a href="transit.php">Transit</a></li>
</ul>
</li>
<li class="tc"><a href="employment.php">Employment  
 <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
</li>
<li class="tc"><a href="contact.php">Contact Us <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="links.php" class="enclose">Community Links</a></li>
<li><a href="volunteer.php">Volunteer Positions</a></li>
<li><a href="directors.php" class="enclose">Board of Directors</a></li>	
</ul>
</li>
</ul>
</div>
</div>

<?php include("drop_menu.php"); ?>

 

 

</div>[/code]

Edited by catfish
Link to comment
Share on other sites

Sorry, my code didn't show. This is the include file

<div id="nav-strip">
<div id="nav">
<ul id="pmenu">
<li class="tc"><a href="index.php">Home <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="about-us.php" class="enclose">About CLCS</a></li>	
</ul>
</li>
<li class="tc"><a href="counselling.php">Counselling
 <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>


<li class="fly"><a href="counselors.php">Our Counsellors<!--[if IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
		<ul>

				<li><a href="./counselors.php#amanda">Amanda Sawatzky</a>
			</li><!--[if lte IE 6]></td></tr></table></a><![endif]-->
			<li><a href="./counselors.php#darlene">Darlene Tully </a></li>
			<li><a href="./counselors.php#brandon">Brandon Riopka</a>
			</li>
			<!--[if lte IE 6]></td></tr></table></a><![endif]-->		
		  </ul>
				<!--[if lte IE 6]></td></tr></table></a><![endif]-->

		</li>
		<li><a href="./counselling.php#resources">Resources</a></li>
	  </ul>
		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="tc"><a href="programs.php">Programs <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="adult-programs.php" class="enclose">Adult Programs</a></li>
<li><a href="parenting-programs.php">Family  Programs</a></li>
<li><a href="youth-programs.php">Youth Programs</a></li>
<li><a href="out-reach.php">Outreach Team</a></li>	
</ul>

</li>
<li class="tc"><a href="services.php">Other Services  <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>


<li><a href="hampers.php">Christmas Hampers</a></li>
<li><a href="meals-on-wheels.php">Meals on Wheels</a></li>
<li><a href="loan-cupboard.php">Red Cross Loans</a></li>
<li><a href="transit.php">Transit</a></li>
</ul>
</li>
<li class="tc"><a href="employment.php">Employment  
 <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
</li>
<li class="tc"><a href="contact.php">Contact Us <!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="links.php" class="enclose">Community Links</a></li>
<li><a href="volunteer.php">Volunteer Positions</a></li>
<li><a href="directors.php" class="enclose">Board of Directors</a></li>	
</ul>
</li>
</ul>
</div>
</div>

Link to comment
Share on other sites

I'm not familiar with shaw - but I think the first thing you have to establish is if this particular hosting account supports php - the other client might be with the same provider, but have a whole different package.

 

The first thing that strikes me as odd is that index.php wasn't displayed automatically. All the accounts I have worked with so far, pretty much accepted anything from html., htm, php, shtml - whatever.

 

And just to be clear - I do not really know what's going on here, I'm just giving you my best guesses and the approach I'd take to this issue.

Link to comment
Share on other sites

I'm not familiar with shaw - but I think the first thing you have to establish is if this particular hosting account supports php - the other client might be with the same provider, but have a whole different package.

 

The first thing that strikes me as odd is that index.php wasn't displayed automatically. All the accounts I have worked with so far, pretty much accepted anything from html., htm, php, shtml - whatever.

 

And just to be clear - I do not really know what's going on here, I'm just giving you my best guesses and the approach I'd take to this issue.

Ok, thankyou both. I'll check with the host.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...