Index CGI Environment Variables SSI Command SSI Environment Variables SSI Time Values
Server Side Includes (SSI) Command
Server Side Includes (SSI) are directives that you can insert into HTML file in order to create a small amount of dynamic information. SSI are not CGI, but they can output a CGI-like information as well as CGI program.
Remember, not all server can support SSI. If your server doesn’t support SSI, you can visit http://sw.cse.bris.ac.uk/WebTools/fakessi.html , or contact your system administrator for a solution. Following table list most common SSI command.
SSI Command
Description
echo Displays environment variable. See CGI environment variable and SSI environment variable
<!--#echo var="SERVER_NAME"--> 
include Inserts text of document into current file. 
File : pathname relative to a docment on the server. 
Virtual : virtual path to a document on the server. 
<!--#include file="cgihelp/ssi.html"-->
<!--#include virtual="cgihelp/ssi.html"-->
<!--#include virtual = "cgihelp/ssi.htm" --> 
fsize Tells the size of a specified file. 
<!--#fsize file="/cgihelp/ssi.html"-->
flastmod Inserts the last modification date and time for a specified file. You may want to change the time format by using config directive with timefmt argument, see SSI time format
<!--#flastmod file="ssi.html"--> bytes 
<!--#flastmod file="ssi.html"--> bytes
exec  Executes external CGI program, or application, and inserts its output in the current document. 
Cmd : Any application on the host 
Cgi : CGI program. 
<!--#exec cmd = "/bin/finger --> 
<!--#exec cgi = "/cgi-bin/counter.cgi"--> 
<!--#exec cmd = "/bin/finger --> 
<!--#exec cgi = "/cgi-bin/counter.cgi"--> 
config Modifies various aspects of SSI. 
Errmsg: Default error message. 
Sizefmt: format for the size of the file for fsize directive, bytes or abbrev. Timefmt : change time format see SSI time format
<!--#config errmsg = "Error: File not found"--> 
<!--#config sizefmt = "abbrev"--> 
Webmaster : Darren Kong
E-mail : darrenkong@hotmail.com