Rex Swain's Server-Side Include Demo

Last updated 13 May 2005

View Source Code:
ssidemo.shtml   ssidemo.html   ssidemo.sh   ssidemo.cgi


Note that Netscape calls this facility "Server-Parsed HTML"; Microsoft calls them "Server-Side Includes".

Following is a demonstration of the commands used in server-parsed HTML. These commands are embedded in HTML files. The server replaces each command with data determined by the command and its attributes. The commands are "hidden" within HTML comments so they are ignored if not parsed by the server.

The format for a command is:

   <!--#command attribute1="value1" attribute2="value2" ... -->

For more information, see http://www.ssi-developer.net/ssi/

Support for SSI varies widely. Some ISPs only allow SSI commands in files with an ".shtml" extension. Some ISPs prohibit certain commands (particularly #exec). Some ISPs don't allow SSI at all. If you control your own server, you can probably turn SSI support on for all files.


<!--#echo var="DATE_LOCAL" -->

Sunday, 24-Mar-2019 08:26:28 PDT

<!--#include virtual="/ssidemo.html" -->

This is HTML code from file ssidemo.html

<!--#include file="ssidemo.html" -->

This is HTML code from file ssidemo.html

<!--#fsize file="ssidemo.html" -->

85

<!--#flastmod file="ssidemo.html" -->

Friday, 08-Nov-1996 02:33:28 PST

<!--#exec cmd="cgi-bin/ssidemo.sh" -->

[an error occurred while processing this directive]

<!--#exec cmd="cgi-bin/ssidemo.cgi" -->

[an error occurred while processing this directive]

<XMP><!--#exec cmd="env" --></XMP>

[an error occurred while processing this directive]

<XMP><!--#exec cmd="set" --></XMP>

[an error occurred while processing this directive]


Other Summaries and Demos


You are visitor [Odometer] since 9 November 1996

Copyright © 1996-1999 Rex Swain
E-mail rex@rexswain.com, Web http://www.rexswain.com