CheckFile函数之asp实现检查某一文件是否存在的代码
程序员文章站
2022-04-14 20:22:11
'================================================== '函数名: checkfile '作  ...
'==================================================
'函数名: 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
'函数名: 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
上一篇: EasyUI动态改变输入框width