WebSite
Server-Side Includes

Version 1.1e (24-Apr-96)
Return to Self-Test
This page demonstrates most of WebSite's server-side include capabilities. The file ssi-incl.txt is located in the same directory as this file, accessible via URL as /wsdocs/32demo/ssi-incl.txt. It contains the text This came from a text file and a CRLF. Since the display is in "preformatted (<PRE>) format, line terminators are significant, so there are blank lines after those items. The CGI program ssicgi.exe simply generates Hello World with no HTTP headers at all. If your CGI program generates HTTP headers, they will appear in the output.

First, we set some SSI configuration variables as shown. Note that you can put comments inside the SSI directives after the directive itself:

<!--#config timefmt="%c" use short date/time -->
<!--#config sizefmt="%d bytes"-->
<!--#config errmsg="##ERROR!##"-->


Then we use SSI directives. The directives are shown followed by the substituted output resulting from these directives. :
SSI DIRECTIVE                                           RESULT
---------------------------------------------------------------------------------------------
<!--#daycnt-->                                          1
<!--#totcnt-->                                          42
<!--#lastzero-->                                        02/22/17 16:55:37
<!--#exec cgi="/cgi-win/ssicgi.exe"-->                  Hello World

<!--#include virtual="/wsdocs/32demo/ssi-incl.txt"-->   This came from a text file

<!--#include file="ssi-incl.txt"-->                     This came from a text file

<!--#fsize virtual="/wsdocs/32demo/ssi-incl.txt"-->     28 bytes
<!--#fsize file="ssi-incl.txt"-->                       28 bytes
<!--#flastmod virtual="/wsdocs/32demo/ssi-incl.txt"-->  04/28/96 21:34:30
<!--#flastmod file="ssi-incl.txt"-->                    04/28/96 21:34:30
<!--#echo var="DOCUMENT_NAME"-->                        C:\WebSite\wsdocs\32demo\ssi.html-ssi
<!--#echo var="DOCUMENT_URI"-->                         /wsdocs/32demo/ssi.html-ssi
<!--#echo var="LAST_MODIFIED"-->                        04/28/96 21:34:30
<!--#echo var="QUERY_STRING"-->                         
<!--#echo var="QUERY_STRING_UNESCAPED"-->               
<!--#echo var="DATE_LOCAL"-->                           09/25/17 16:54:31
<!--#echo var="SERVER_SOFTWARE"-->                      WebSite/1.1e
<!--#echo var="SERVER_NAME"-->                          SRVSNCOMALM.ANCLO.local
<!--#echo var="SERVER_PROTOCOL"-->                      HTTP/1.0
<!--#echo var="REQUEST_METHOD"-->                       GET
<!--#echo var="REMOTE_HOST"-->                          192.168.19.1
<!--#echo var="HTTP_ACCEPT"-->                          text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
<!--#echo var="HTTP_USER_AGENT"-->                      CCBot/2.0 (http://commoncrawl.org/faq/)
<!--#echo var="REFERER"-->                              
<!--#echo var="BOGUS"-->                                ##ERROR!##