Function File_GetLastModified( sFile )
Dim objFileObj, objFile
Set objFileObj = CreateObject("Scripting.FileSystemObject")
If sFile = "" Then
sFile = Server.MapPath( Request.ServerVariables
("script_NAME") )
End If
Set objFile = objFileObj.GetFile(sFile)
File_GetLastModified = objFile.DateLastModified
End Function
Response.Write "記錄文件被修改:" File_GetLastModified
("d:\shenzhaoyang\record.txt")
Response.Write "糟了,這個文件已被修改過!" File_GetLastModified("")
[1]