文章作者 : letitbe [ dou_j@263.net ] Web URL : http://
上载日期 : 2000-12-20
你可能想在你所有的文章的脚注里自动包含文章的更新日期和文件名,你只要把下面的代码加入即可 :-)
代码如下:
==================================================================
Your File
==================================================================
<html>
<head>
<title></title>
</head>
<body>
<cfinclude template="footer.cfm">
</body>
</html>
==================================================================
==================================================================
footer.cfm
==================================================================
<cfset lengthpath = #Len(PATH_INFO)#>
<cfset token = "#mid(PATH_INFO,2,lengthpath)#">
<cfset lenDir =#len(CF_TEMPLATE_PATH)#-#len(token)#>
<cfset ShowDir ="#left(CF_TEMPLATE_PATH,'#lenDir#')#">
<cfdirectory directory="#ShowDir#" filter="#token#"
name="showdir">
<br><br>
<font face="Arial" size="-1">
File Last Updated
<cfoutput query="ShowDir">
#name#, #DateLastModified#
</cfoutput>
</font>
|