footer and nav include

Reply

Join Date: Dec 2003
Posts: 3
Reputation: TMPAdmin is an unknown quantity at this point 
Solved Threads: 1
TMPAdmin TMPAdmin is offline Offline
Newbie Poster

footer and nav include

 
0
  #1
Feb 25th, 2004
I used to know how to do this but it seems as though time and new programming has passed me by. I just want to include a simple web page for a left nav bar and one for a footer. In Dreamweaver I use <!--#include file="includes/leftnav.htm" --> and it shows up in the preview but when I put the page on my host (tested on two hosts) and locally just opening the index.htm through my computer the inclues are not there. I also tried <include src="file.htm"> but that didn't work in either DW or explorer.

PLEASE can anyone help out. I just want this site as simple as possible but I don't want to have to deal with pasting the nav and footer on each page.

Thanks,
TMP
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 781
Reputation: Zachery has a spectacular aura about Zachery has a spectacular aura about 
Solved Threads: 21
Team Colleague
Zachery's Avatar
Zachery Zachery is offline Offline
The Geek Father

Re: footer and nav include

 
0
  #2
Feb 25th, 2004
What if anything are you programming in? If your using just html you should really brush up on your skills
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,047
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 130
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: footer and nav include

 
0
  #3
Feb 25th, 2004
What you are doing by including files is called SSI, server side includes. Normally files which use SSI have an *.shtml extension but sometimes an *.html extension is supported as well.

SSI, as its name suggests, is performed server-side. Therefore, the server hosting the files needs to support it. Apparently the remote hosts you are using support SSI but your local computer does not, and therefore it won't work locally. That's okay - just upload the files and it should all work.

It's similar to how a web dev language such as PHP operates. You can't execute PHP code locally without installing Apache or the like on your home machine.

If you wish to be able to test SSI out locally, install the Apache server (windows version) on your home machine. Otherwise, create a folder no one knows about on your remote host to do testing
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 282
Reputation: Roberdin will become famous soon enough Roberdin will become famous soon enough 
Solved Threads: 6
Team Colleague
Roberdin Roberdin is offline Offline
Supreme Evil Overlord

Re: footer and nav include

 
0
  #4
Feb 25th, 2004
Hmmm, you could download, install Apache, spend three hours poking it until it works, then setup PHP, go back to poking Apache, and learn how to do some absic PHP scripting, and persuade your host to install it.... or you could do this:

HTML and CSS Syntax (Toggle Plain Text)
  1. <script type="text/html" src="header.htm"></script>
  2. and
  3. <script type="text/html" src="footer.htm"></script>
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 6
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: footer and nav include

 
0
  #5
Feb 25th, 2004
Originally Posted by Roberdin
Hmmm, you could download, install Apache, spend three hours poking it until it works, then setup PHP, go back to poking Apache, and learn how to do some absic PHP scripting, and persuade your host to install it.... or you could do this:

HTML and CSS Syntax (Toggle Plain Text)
  1. <script type="text/html" src="header.htm"></script>
  2. and
  3. <script type="text/html" src="footer.htm"></script>
That only applies when including JavaScript/VBScript, not HTML files. He'd have to output his HTML using JavaScript to make that work. I wish it worked though, because that would definitely come in useful!
Check out my blog at http://www.shinylight.com for more stuff about web dev.
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 207
Reputation: rixius is an unknown quantity at this point 
Solved Threads: 1
rixius rixius is offline Offline
Posting Whiz in Training

Re: footer and nav include

 
0
  #6
Feb 28th, 2004
Does your remote host support php?
Reply With Quote Quick reply to this message  
Join Date: Jan 2004
Posts: 152
Reputation: floris has a spectacular aura about floris has a spectacular aura about 
Solved Threads: 2
floris's Avatar
floris floris is offline Offline
vBulletin.com Staff

Re: footer and nav include

 
0
  #7
Mar 1st, 2004
www.w3c.org has great information about xhtml and ssi
you could also rename your pages to .php and include it using php

<?php include ... ?>

www.php.net function search: include
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,047
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 130
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: footer and nav include

 
0
  #8
Mar 1st, 2004
Hey floris, welcome back - long time no see

But that goes right back to the original problem ... his local computer won't execute PHP scripts
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 2
Reputation: crc3577 is an unknown quantity at this point 
Solved Threads: 0
crc3577's Avatar
crc3577 crc3577 is offline Offline
Newbie Poster

Re: footer and nav include

 
0
  #9
Mar 2nd, 2004
look at that guy above me, avatar. :rolleyes:
Group Net Business Forum great information everyday
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 94
Reputation: Ragnarok is an unknown quantity at this point 
Solved Threads: 0
Ragnarok Ragnarok is offline Offline
Junior Poster in Training

Re: footer and nav include

 
0
  #10
Mar 4th, 2004
Originally Posted by Roberdin
Hmmm, you could download, install Apache, spend three hours poking it until it works, then setup PHP, go back to poking Apache, and learn how to do some absic PHP scripting[/code]
or you could do it the easy way and follow this tutorial Installing Apache, PHP, and MySQL under Windows
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC