Re: Two for one......

by "Bert" <bdoorn(at)iprimus.com.au>

 Date:  Sat, 30 Mar 2002 20:05:36 +0800
 To:  "seecurb" <seecurb(at)bigfoot.com>
 Cc:  <hwg-basics(at)hwg.org>
 References:  hilma computer
  todo: View Thread, Original
G'day

> Is it possible...can I... generate a web page in the viewer's
> browser from two different files?

Short answer: Server Side Includes.  It's a FAQ on the list (if only the
archives were working)

If you have a FrontPage enabled site , you can use FrontPage's own version
of includes.  Otherwise, use SSI.  most servers support it and in most
cases, the file which has the other content pulled into it would need to
have a .shtml extension (there are exceptions).

The basic command to put into the .shtml file is (remove the dot at the
beginning):
<.!--#include file="filename.ext" -->

The file extension of the secondary file can be virtually anything.  I tend
to use .inc (for include) so I know the purpose of the file.

Here's a few links I found in Google (search term: SSI Tutorial):
http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html
http://www.useforesite.com/tut_ssi.shtml
http://www.carleton.ca/~dmcfet/html/ssi.html
http://www.mattkruse.com/info/ssi/

It's often also used to set up page headers and footers for dynamically
generated pages in ASP and PHP files.  Command structure is the same.

HTH
--
Bert Doorn, Web Developer
www.betterwebdesign.com.au
Fast Loading, User Friendly Websites
www.bwdzine.com/bwdt/
Beginners' Web Design Tutorial

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA