您的位置:首页 > 编程语言 > ASP

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

2007-09-01 00:00 513 查看
'==================================================
'函数名: 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: