当前位置: 移动技术网 > IT编程>开发语言>Asp > CheckFile函数之asp实现检查某一文件是否存在的代码

CheckFile函数之asp实现检查某一文件是否存在的代码

2017年12月12日  | 移动技术网IT编程  | 我要评论
'==================================================
'函数名: checkfile
'作  用:检查某一文件是否存在
'参  数:filename ------ 文件地址 如:/swf/1.swf
'返回值:false  ----  true
'==================================================
    public function checkfile(filename)
         on error resume next
         dim fsoobj
         set fsoobj = server.createobject("scripting.filesystemobject")
          if not fsoobj.fileexists(server.mappath(filename)) then
              checkfile = false
              exit function
          end if
         checkfile = true:set fsoobj = nothing
    end function

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

相关文章:

验证码:
移动技术网