Function FolderFileExists(path,pathtype) '检测文件/文件夹是否存在 【返回值:true|false】 '================================================== '作者:飞飞 '网址:www.ffasp.com 'QQ:276230416 '邮箱:rabbit25132008@gmail.com '================================================== '参数说明 'path 文件或文件夹路径 'pathtype 为0时 为文件 ,为1则为文件夹 '==================================================
Dim FsoExists Set FsoExists=Server.CreateObject("Scripting.FileSystemObject") If pathtype=0 Then '文件 FolderFileExists=FsoExists.fileExists(Server.MapPath(path)) Else FolderFileExists=FsoExists.FolderExists(Server.MapPath(path)) End If Set FsoExists=Nothing End Function '===================================================================
|