[Home] [About The World] [Kiosk Web Hosting] [Customer Help]
[Memo] [Login] [WebMail Login]


Examples of SSI directives in action


If you were to "View Source" for this page right now, you wouldn't see the SSI directives, you'd only see their results. Go here to see the actual SHTML source of this page.


Dates and Times

Some typical examples of "config timefmt":
Standard short date:
This page was last updated on 02/14/03.
A longer custom date:
This page was last updated on Friday, February 14, 2003.
And now with the time too:
This page was last updated on 18:23:36 02/14/03
The current local date: 02:32:58 08/28/08
The current GMT date: 06:32:58 08/28/08

Some of the parameters you can use in "config timefmt":
The local date: a=Thu, A=Thursday, b=Aug, B=August, c=Thu Aug 28 02:32:58 2008, d=28, m=08, U=34, W=34, w=4, x=08/28/08, y=08, Y=2008
Some more "config timefmt" parameters:
The local date: H=02, I=02, j=241, M=32, p=AM, S=58, X=02:32:58, Z=EDT
See "man strftime" for explanations.

"echo"

Some variables you can display with "echo":
DOCUMENT_NAME = ssi_example.shtml.
DOCUMENT_URI = /web/help/ssi_example.shtml. (NCSA says "URI", everyone else says "URL".)
QUERY_STRING_UNESCAPED = (none).
DATE_LOCAL = 02:32:58 08/28/08.
DATE_GMT = 06:32:58 08/28/08.
LAST_MODIFIED = 18:23:36 02/14/03.
(The LAST_MODIFIED variable is probably the most useful one here, as it lets your page automatically say when it was last updated!)

"include"

"include" directives allow you to embed text or fragments of HTML in your pages from external files, which is great for putting the same signature or navigation map on all your pages. Below a signature is included automatically:


This page was created by some guy with a Web server.
Have a nice day!
This page was created by some guy with a Web server.
Have a nice day!
Although those two versions of "include" reach the same file, "include file" looks in the current directory (the name must not start with /, ., or ..) and "include virtual" starts in the root directory of your kiosk (so the name must start with "/".) You might want to make a "/includes" directory in your Kiosk and then you can say "include virtual="/includes/file.txt"" from any page. The "virtual" and "file" parameters are also used with "fsize" and "flastmod". With either method, you can only reference files that are within your Kiosk directory.

file sizes and modification dates

How large is a file? "fsize" and "config sizefmt" will tell us:
index.html is [an error occurred while processing this directive] bytes.
index.html is [an error occurred while processing this directive].
And we can find out how old a file is with "flastmod":
And it was last changed on [an error occurred while processing this directive].

CGIs

You can call a CGI which returns a chunk of text with "exec cgi":


[an error occurred while processing this directive]

error messages

Here is the default error message, generated by three bad SSI commands:
[an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive]

And now we're going to make our own error message instead (I don't know why you'd want to, but you can):
You bozo, you put some bad SSI commands in this file.
You bozo, you put some bad SSI commands in this file.
You bozo, you put some bad SSI commands in this file.




Our other SSI help:
Source code of this page
Basic SSI documentation



(@) THE WORLD
Comments? Questions? Problems? Contact us.
Page last modified February 14, 2003.
Web site contents & design Copyright © 2003 Software Tool & Die.
  Legal info.
Spammers are crooks! Don't do business with crooks!