首页 > 学院 > 编程设计 > 正文

如何获知文件最后的修改日期和时间?

2020-06-19 13:51:00
字体:
来源:转载
供稿:网友

<%
Dim objCMFU
Dim strModified

Set objCMFU = Server.CreateObject("CM_FileUtils.GetProperty")
'
创建对象并赋给变量,并且GetProperty类是当前唯一可用的.

strModified = objCMFU.LastModified
'
检索并返回包含最后修改日期和时间(LastModified function )值.当然了,还要考虑到出错的可能.
 
Set objCMFU = Nothing
'
清空.
%>

<% If strModified = "Error!" Then %>
对不起,出错了!
<% Else %>
这个文件最后修改于:

<%= strModified %>

<%= FormatDateTime(CDate(strModified),1) %>

<%= FormatDateTime(CDate(strModified),3) %>

 

<% End If %>

 

[1]

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表