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


            i = i + 1
        END IF
    Next
    ByteToStr = strReturn
End Function

Function GetHttpPageContent(url,Method,SendStr)
    Dim Retrieval
    SET Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
    With Retrieval
        .Open Method, url, False ,"" ,""
        .setRequestHeader "Content-Type","application/x-www-form-urlencoded"
        .Send(SendStr)
        GetHttpPageContent = .ResponseBody
    End With
    SET Retrieval = Nothing
    GetHttpPageContent=ByteToStr(GetHttpPageContent)
End Function

Function RegExpText(strng,regStr)
    Dim regEx,Match,Matches,RetStr
    SET regEx = New RegExp
    regEx.Pattern = regStr
    regEx.IgnoreCase = True
    regEx.Global = True
    SET Matches = regEx.Execute(strng)
    For Each Match in Matches
        RetStr = RetStr & regEx.Replace(Match.Value,"$1") & ","
    Next
    RegExpText = RetStr
    set regEx=nothing
End Function

Function StreamBytesToBstr(strBody, CodeBase)
Dim objStream
SET objStream = Server.CreateObject("Adodb.Stream")
With objStream
    .Type = 1
    .Mode = 3
    .Open
    .Write strBody
    .Position = 0
    .Type = 2
    .Charset = CodeBase
    StreamBytesToBstr = .ReadText
    .Close
End With
SET objStream = Nothing
End Function
%>

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

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