设为首页 | 收藏本页
登陆您的帐号 | 免费注册帐号
全部栏目 > 计算机 > 互联网络 > 网站设计和发展 > 网页制作
下一篇上一篇 首页图文展示(无图)

asp定时自动删除程序


等级:
文章:1|2
注册:2020-06-04
商号:未登记
信誉:查看资质
发布人:zyc
发布日期:2015-06-09 07:55:36
刷新日期:2015-06-09 07:55:36
回复或评论:0
阅览:525
<!--asp 定时自动删除文件-->
<%
Dim   w   
  w=weekday(now())  
  If   w=7   Then     
  delFile   
  End   If   
  Function   delFile   
  Set   fso   =   CreateObject("Scripting.FileSystemObject")   
  Path   =   server.MapPath("admin/")   
  Set   f   =   fso.GetFolder(Path)   
          Set   fc   =   f.Files   
          For   Each   f   In     fc   
                  If   fso.FileExists(f)   Then   fso.DeleteFile(f)   
                  'If   fso.FolderExists(f)   Then   fso.DeleteFolder(f)   
          Next   
  End   Function  
%>
评论(0) 暂无回帖


打印 收藏 关闭窗口 下一篇上一篇