asp实现检查目录是否存在与建立目录的函数

''------------------------- ''--检查目录是否存在 ''---------------------- FunctionCheckDir(byvalFolderPath) dimfso Setfso=Server.CreateObject('Scripting.FileSystemObject') Iffso.FolderExists(Server.MapPath(folderpath))then ''存在 CheckDir=True Else  

作者: 来源: 时间: 17-11-23 15:38:56

''-------------------------
''--检查目录是否存在
''----------------------
Function CheckDir(byval FolderPath)
    dim fso
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    If fso.FolderExists(Server.MapPath(folderpath)) then
    ''存在
        CheckDir = True
    Else
    ''不存在
        CheckDir = False
    End if
    Set fso = nothing
End Function

''-------------------------
''--建立目录
''----------------------
Function MakeNewsDir(byval foldername)
    dim fso
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
        fso.CreateFolder(Server.MapPath(foldername))
        If fso.FolderExists(Server.MapPath(foldername)) Then
           MakeNewsDir = True
        Else
           MakeNewsDir = False
        End If
    Set fso = nothing
End Function
11
22
33
隐藏区块

会员注册

本功能为预留功能,暂不支持注册 ^_^

Login

社交帐号登陆

使用以下任意帐号可登陆本站

Close section
Close

联系我们

关于5UCMS 您有任何需求 均可以留言给我们