J. Blustein

Web-centric Computing

Some Example Code

SSI Test Page

This page looks different on

What works (and what doesn't)

  1. <!--#echo var="DATE_LOCAL" -->
  2. <!--#echo var="document_name" -->
  3. <!--#exec cmd="/usr/bin/echo exec works" -->
  4. Include virtual works on torch (see below)

Sometimes small differences matter...

  1. <!--#echo var="DATE_LOCAL" -->
  2. <!-- #echo var="DATE_LOCAL" -->

    Because of the extra space in the second example, the directive is not recognized

A whole lot of testing goin' on

  1. Date & Time

    1. <!--#echo var="DATE_LOCAL" -->
    2. <!--#echo var="Date_GMT" -->
  2. About this document

    1. <!--#echo var="DOCUMENT_NAME" -->
    2. <!--#echo var="DOCUMENT_URI" -->
    3. <!--#echo var="last_modified" -->
  3. About this server

    1. <!--#echo var="server_name" -->
    2. <!--#echo var="server_software" -->
  4. About the user/browser

    1. <!--# echo var="HTTP_USER_AGENT" -->
    2. <!--# echo var="GATEWAY_INTERFACE" -->
    3. <!--#echo var="remote_addr" -->
  5. Files on the server (executables and data files)

    1. <!--#exec cmd="/usr/bin/echo exec works" -->
    2. <!--#exec cmd="/usr/bin/id" -->
    3. <!--#exec cmd="/usr/bin/cat /etc/passwd" -->
  6. If

         <pre>
          <!--#if expr="apple=orange" -->
           If is not working
          <!--#else -->
           If *is* working
          <!--#endif -->
         </pre>
         
          
           If is not working
          
           If *is* working
          
         
  7. CGI executables within SSI

    1. CGI directive
                 <!--#exec cgi="/~maxwell/cgi-bin/test-cgi.cgi" -->
               
                 
               
    2. Include virtual directive
                 <pre>
      <!--#include virtual="/~maxwell/cgi-bin/test-cgi.cgi" -->
      </pre>
                  
                

Important Notes


http://www.cs.dal.ca/~jamie/course/CS/3172/examples/SSI/test1.shtml
Version:
23 October 2001
Based on
ssitest.shtml from Chris Maxwell
Prof:
J. Blustein <jamie@cs.dal.ca>

Valid XHTML 1.0!