A Brief Note on Usage of Server Side Includes:

(Prog. Ref. Guide: Appendix 2)
The following is a brief note on the usage of server side includes as used by the documents in this directory. The pages contained within this directory for the most part are suffixed with the extension .shtml. The use of this suffix indicates to the local server (NCSA type) that this file is not to be cashed and may include directives for the server to carry out.

These directives are referred to as server side includes. The tag for a server side include follows the following pattern:

      <!--#command param1="value" [param2="value"...]-->
These tags can be used to include pertinent information about the files automatically. For instance the last modified date can be taken from the environment variable LAST_MODIFIED like this.
   <em>
   This document was last modified  <!--#echo var="LAST_MODIFIED"-->
   </em>
And it would appear like this:
This document was last modified Friday, 20-Dec-1996 21:32:33 EST

The following variables may also be included using #echo

          DOCUMENT_NAME current filename
          DATE_LOCAL    local date
          DATE_GMT      Greenwich mean time
It is also possible to include file contents using #include; for example the signature file "signature.shtml" yields...


91.523 - Software Engineering Project - · - 96f523 - bde2java

[an error occurred while processing this directive]/SHTML.shtml
Last updated: Friday, 20-Dec-1996 21:32:33 EST


The other possible parameter is "virtual" which requires a URL path.

Finally, the last directive discussed is #exec which will execute a system command. These should be limited to "safe" commands (not mv or rm) that send output to stdout.

To get the current directory of this very file:

yields:

Usage of these files will allow the creation of files that can maintain their own path and filename information independently of their being moved about the directory structure. These are also server processed jobs and therefore will work on most browsers and do not require java capable environments to work. Servers operating NCSA httpd (which CS does) support this. In fact the directives themselves are invisible to client source viewers. They only require that the extension .shtml so that the server will recognize them.