- From: Gregory Martin Pfeil <pfeilgm@cs.jmu.edu>
- Date: Thu, 16 Apr 1998 04:33:54 -0400 (EDT)
- To: Pascal Sitbon <sitbon@uranus.crosat.fr>
- cc: www-html@w3.org
On Thu, 16 Apr 1998, Pascal Sitbon wrote:
>
> I don't understand why there's no instruction to include a file
> in html in another. For example, I have a menu.html file which
> describes the main menu, and for all *.html in the site, I would
> include the menu simply by putting something like :
> <INCLUDE HREF="menu.html">
> (like the \insert{} command in LaTeX or the #include in C langage)
> I think that this can be useful in many cases.
> (I know that it's possible to do frame pages but I don't want)
There is a way, but it requires that the server has SSI (Server Side
Includes) available. A lot of commercial Web hosts turn off the
functionality in order to improve security.
For example, to include menu.html, you could use:
<!--#include file="menu.html"-->
There are a lot of others, such as #exec (to execute a command) and
#config (to set up aspects of SSI). Since this is done on the server
side, the actual <!--*--> is replaced with the output before you ever see
it.
I use this on _every_ one of my pages. To see the effect (to a limited
extent) you can visit
http://sys12.cs.jmu.edu/wwwhomes/pfeilgm/fingerall.shtml. Basically, it
lists all the finger information for everyone who is logged on at the
moment the page loads. If you look at the source, you won't see the
include, but I guarantee, for each line of HTML on the page, there is an
SSI command.
--
Gregory Martin Pfeil Programmer-Misogynist-BUFH-MIRC
mailto:pfeilgm@jmu.edu http://falcon.jmu.edu/~pfeilgm/
ICQ#: 235067
Received on Thursday, 16 April 1998 04:42:29 UTC