Basic SSI directives Syntax
<!--#element attribute=value attribute=value ... -->
Today's date
<!--#config timefmt="%Y/%m/%d %a %H:%M:%S" --> Today is <!--#echo var="DATE_LOCAL" -->
Modification date of the file
This document last modified <!--#flastmod file="index.html" -->
Including the results of a CGI program
<!--#include virtual="/cgi-bin/counter.pl" --> <!--#include virtual="/cgi-bin/example.cgi?argument=value" -->
You can use "#exec cgi=" directive, but it can be disabled using the IncludesNOEXEC Option.
Including a standard footer
<!--#include virtual="/footer.html" -->
Executing commands
<!--#exec cmd="ls" -->
This feature is dangerous. You can allow SSI, but not the exec feature, with the IncludesNOEXEC argument to the Options directive.
Setting variables
<!--#set var="modified" value="$LAST_MODIFIED" --> <!--#set var="date" value="${DATE_LOCAL}_${DATE_GMT}" -->
Conditional expressions
<!--#if expr="test_condition" --> <!--#elif expr="test_condition" --> <!--#else --> <!--#endif -->
Copyright © 2006 WorldHello 开放文档之源 计划 |