;中国 COLD FUSION 用户组; WWW.CFWINDOW.COM 
您的位置 :首页 >> CF 技巧文章 >> 阅读文章内容 [ 关闭窗口 ]      

技巧文章内容 
    自动包含文章上次更新时间的脚注文件
文章作者 : 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>







< 联系我们 --- 中国Cold Fusion用户组>

CFUG 国内(总部):Linkfoxo    上海:CFANS    北京:Cafe,Cyberkid,liwater    沈阳:Wangking
  
哈尔滨:Baiming    浙江:梅盛松    江西:陈末
  
CFUG (国际) Nagoya(名古屋):Codeguru    新加坡:YUZI    新西兰(Auckland):Richard CHEN
Copyright 2000-2001 www.cfwindow.com.All rights reserved

;中国 COLD FUSION 用户组; WWW.CFWINDOW.COM