当前位置: 移动技术网 > IT编程>开发语言>其他编程 > 如何获知文件被改动的情况?

如何获知文件被改动的情况?

2017年12月08日  | 移动技术网IT编程  | 我要评论

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]

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网