This page demonstrates server-side include capabilities.

The file ssi-incl.txt is located in the same directory as this file, accessible via URL as /docs/ssi/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!##"-->

[an error occurred while processing this directive]
Then we use SSI directives. The directives are shown followed by the substituted output resulting from these directives. :
SSI DIRECTIVE                                           RESULT
---------------------------------------------------------------------------------------------
<!--#exec cgi="/cgi-bin/hello.cgi"-->                   ##ERROR!##
<!--#include virtual="/main/docs/ssi/ssi-incl.txt"-->   ##ERROR!##
<!--#include file="ssi-incl.txt"-->                     This came from a text file

<!--#fsize virtual="/main/docs/ssi/ssi-incl.txt"-->     ##ERROR!##
<!--#fsize file="ssi-incl.txt"-->                        28 
<!--#flastmod virtual="/main/docs/ssi/ssi-incl.txt"-->  ##ERROR!##
<!--#flastmod file="ssi-incl.txt"-->                    Tue Jul  9 11:23:19 2013

<!--#echo var="DOCUMENT_URI"-->                         /docs/SSI/ssi.shtml
<!--#echo var="LAST_MODIFIED"-->                        09/07/1913
<!--#echo var="QUERY_STRING"-->                         
<!--#echo var="QUERY_STRING_UNESCAPED"-->               (none)
<!--#echo var="DATE_LOCAL"-->                           25/02/1918;
<!--#echo var="DATE_GMT"-->                             25/02/1918
<!--#echo var="SERVER_NAME"-->                          store.in.ru
<!--#echo var="SERVER_PROTOCOL"-->                      HTTP/1.0
<!--#echo var="REQUEST_METHOD"-->                       GET
<!--#echo var="REMOTE_HOST"-->                          (none)
<!--#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="HTTP_REFERER"-->                         (none)
<!--#echo var="BOGUS"-->                                (none)