[ale] "includes" in html

Fulton Green ale at FultonGreen.com
Sat Jan 6 20:10:18 EST 2001


I'm looking into doing this so I can include a semi-complex image map
(rendered in tables and using JavaScript for mouse-overs) in every page for
the site I'm maintaining w/o doing frames.

In general, if you've enabled the capability in your web server of choice
(I'm dealing w/IIS, not by choice), you can use server-side inclusion
capabilities (where the parsing is done on the server side, then the result
is streamed out to the client). The file that's doing the including typically
has a specialised extension (.shtml is the most common) so the server will
know to parse it extra-specially. The include statement takes two forms:

<!--#include file="/var/www/html/mysite/file2include.html" -->
includes a file from the filesystem local to the webserver's host (this may
be where the alluded security risk comes into play)

<!--#include virtual="/mysite/file2include.html" -->
performs a fetch over HTTP.

All this, of course, if including is all you're doing. Anything more
complicated and you'll need something more powerful, such as PHP or JSP I'm
already encountering a few situations that will need ASP capabilities (at
least until I can get the site converted to Linux :).

On Sat, Jan 06, 2001 at 05:27:59PM -0500, Michael H. Warfield wrote:
> On Sat, Jan 06, 2001 at 05:23:22PM -0500, Kenneth W Cochran wrote:
> > Hi,
> 
> > Is there an .html "analog" to C's #include?
> 
> > For example, how would/could I "include/copy" parts of a
> > "document" (chapters?) into a "master" document?
> > I'm digging though the books & this *must* be Something
> > Obvious I'm Overlooking...
> 
> 	Maybe, maybe not...  There are such things as "server side includes"
> but they have to be enabled and run some non-negligible security risk.
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list