WebSite Professional Server Self Test

Server-Side Includes

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-->                                          804
<!--#lastzero-->                                        01/31/07 15:02:03
<!--#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"--> 08/28/97 14:00:00
<!--#flastmod file="ssi-incl.txt"-->                    08/28/97 14:00:00
<!--#echo var="DOCUMENT_NAME"-->                        C:\WebSite\wsdocs\32demo\ssi.html-ssi
<!--#echo var="DOCUMENT_URI"-->                         /~wsdocs/32demo/ssi.html-ssi
<!--#echo var="LAST_MODIFIED"-->                        08/28/97 14:00:00
<!--#echo var="QUERY_STRING"-->                         
<!--#echo var="QUERY_STRING_UNESCAPED"-->               
<!--#echo var="DATE_LOCAL"-->                           04/24/25 21:44:11
<!--#echo var="SERVER_SOFTWARE"-->                      WebSitePro/2.5.4
<!--#echo var="SERVER_NAME"-->                          springacre3.springacre.com
<!--#echo var="SERVER_PROTOCOL"-->                      HTTP/1.0
<!--#echo var="REQUEST_METHOD"-->                       GET
<!--#echo var="REMOTE_HOST"-->                          18.221.240.145
<!--#echo var="HTTP_ACCEPT"-->                          */*
<!--#echo var="HTTP_USER_AGENT"-->                      Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
<!--#echo var="REFERER"-->                              
<!--#echo var="BOGUS"-->                                ##ERROR!##