整理了一个editplus的剪辑文件(ASP方面的内容)(6)


    Next
    RndCode=vCodes
End Function
%>


#T=============================
#T=FSO相关操作
#T= 判断目录是否存在
<%
Function IsFloderExist(strFolderName)
    SET FSO=Server.CreateObject("Scripting.FileSystemObject")
    IF(FSO.FolderExists(strFolderName))THEN
        IsFloderExist = True
    ELSE
        IsFloderExist = False
    END IF
    SET FSO=NOTHING
End Function
%>

#T= 创建目录
<%
Function CreateFolder(strFolderName)
    SET FSO=Server.CreateObject("Scripting.FileSystemObject")
    IF(FSO.FolderExists(strFolderName) = False)THEN
        FSO.CreateFolder(strFolderName)
    END IF
    SET FSO=NOTHING
END Function
%>

#T= 删除目录
<%
Function DeleteFolder(strFolderName)
    SET FSO=Server.CreateObject("Scripting.FileSystemObject")
    IF(FSO.FolderExists(strFolderName))THEN
        FSO.DeleteFolder(strFolderName)
    END IF
    SET FSO=NOTHING
END Function
%>

#T= 判断文件是否存在
<%
Function IsFileExist(strFileName)
    SET FSO=Server.CreateObject("Scripting.FileSystemObject")
    IF(FSO.FileExists(strFileName))THEN
        IsFileExist = True
    ELSE
        IsFileExist = False
    END IF
    SET FSO=NOTHING
End Function
%>

#T= 删除文件
<%
Function DeleteFile(strFileName)
    SET FSO=Server.CreateObject("Scripting.FileSystemObject")
    IF(FSO.FileExists(strFileName))THEN
        FSO.DeleteFile(strFileName)
    END IF
    SET FSO=NOTHING
END Function
%>

#T=============================
#T= ASP小偷常用的几个函数
<%
Function ByteToStr(vIn)
    Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
    strReturn = ""
    For i = 1 To LenB(vIn)
        ThisCharCode = AscB(MidB(vIn,i,1))
        IF(ThisCharCode < &H80)THEN
            strReturn = strReturn & Chr(ThisCharCode)
        ELSE
            NextCharCode = AscB(MidB(vIn,i+1,1))
            strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3456.html