您的位置:IT教程网首页>网站建设教程>html>shtml精简教程

shtml精简教程



5、Flastmod:显示指定文件的最后修改日期,可以结合config 命令的timefmt参数控制输出格式。

<!--#config timefmt="%A, the %d of %B, in the year %Y" -->
<!--#flastmod file="file.html" -->

这里,我们可以利用flastmod参数显示出一个页面上所有链接页面的更新日期。方法如下:

<!--#config timefmt=" %B %d, %Y" -->
<A HREF="/directory/file.html">File</A>
<!--#flastmod virtual="/directory/file.html" -->
<A HREF="/another_directory/another_file.html">Another File</A>
<!--#flastmod virtual="/another_directory/another_file.html" -->
显示结果为:
File April 19, 2000
Another File January 08, 2000

6、Exec

Exec命令可以执行CGI脚本或者shell命令。使用方法如下:

 Cmd:使用/bin/sh执行指定的字串。如果SSI使用了IncludesNOEXEC选项,则该命令将被屏蔽。

 Cgi:可以用来执行CGI脚本。例如,下面这个例子中使用服务端cgi-bin目录下的counter.pl脚本程序在每个页面放置一个计数器:

 <!--#exec cgi="/cgi-bin/counter.pl" -->
共4页: 上一页 [1] [2] [3] 4 下一页