A common mistake users make when first attempting to use SSI is to include a space between the <!-- and the #, perhaps because the construct resembles an HTML comment. It won't work with a space before the command - it's simply a comment then.
List of [a-e]*.shtml files in this directory:
[an error occurred while processing this directive]Display the current time using the default date format.
Use another time format for file modified date.
This file was last modified <!--#echo var="LAST_MODIFIED" -->.
This file was last modified 9:23:31 pm, Sun, Oct. 07, 2007.
An alternate way is <!--#flastmod file="test.shtml" -->
9:23:31 pm, Sun, Oct. 07, 2007
The name of this file is <!--#echo var="DOCUMENT_NAME" -->
The name of this file is test.shtml
This file size is <!--#fsize file="test.shtml" -->
This file size is 4.2K
The DOCUMENT_URI of this file is <!--#echo var="DOCUMENT_URI" -->
The DOCUMENT_URI of this file is /~lundyd/test.shtml
Show something about your browser:
<!--#if expr="${HTTP_USER_AGENT} = /MSIE/" -->
You are using some version of Microsoft IE Browser Be careful!
<!--#else -->
Thank you for not using a Microsoft IE Browser
<!--#endif -->
Your browser identifies itself as <!--#echo var="HTTP_USER_AGENT" -->.
Result:
Thank you for not using a Microsoft IE Browser
Your browser identifies itself as CCBot/1.0 (+http://www.commoncrawl.org/bot.html).
Several variables are made available to parsed documents. In addition to the CGI variable set, the following variables are made available:
To learn more about SSI, see this very complete tutorial at LearnThat.com.
<!--#include virtual=".include_brief_footer.shtml"-->
|
| |||
|
|
|||
|
|
This page was last modified Sun, Oct 07 2007 09:23 pm EDT. |
Contact: Dave Lundy | |