ACCC Home Page ACADEMIC COMPUTING and COMMUNICATIONS CENTER
Accounts / Passwords Email Labs / Classrooms Telecom Network Security Software Computing and Network Services Education / Teaching Getting Help
 
Server Side Include Programming
0 Contents 1 Introduction 2 Mechanics 3 Examples A1 Related Links

Mechanics

 

The mechanics are pretty simple. Create a normal HTML file, put in the SSI directives, and publish it on the Web in the normal way.

 
   
 
     
File Extensions
 

All SSI files need to have the file extension .shtml Don't use .html or .htm for ssi. And, conversely, don't use .shtml unless you are actually using SSI capabilities. The server must read the contents of every .shtml file, whether or not you have SSI directives in it.

You probably know that the special name index.html or index.htm is used, if the URL does not include a specific filename. As it turns out, index.shtml is also acceptable, so you can use SSI as the default file in a directory.

 
     
Directives
  Here is the complete description of SSI directives. Beware, however, that this is for a newer version of the Web server than we currently have running. An abbreviated version of the directives is below.

An SSI directive always looks like this:

  <!--#element attribute=value attribute=value ... --> 
Note that there is no space between the -- and the # sign.

The allowed directives are:

  • include -- used to include one file in another
  • flastmod -- used to print the last time the file was modified
  • fsize -- used to print the file size
  • exec -- Sorry, this is not valid at UIC. If you want to run CGI, you'll have to run through perlwrap

See the examples for how to use these. It's pretty simple, and easier to understand from the examples.

 
 

SSI Previous: 1 Introduction Next: 3 Examples


2005-8-16  wwwtech@uic.edu
UIC Home Page Search UIC Pages Contact UIC