• <label id="pxtpz"><meter id="pxtpz"></meter></label>
      1. <span id="pxtpz"><optgroup id="pxtpz"></optgroup></span>

        當(dāng)前位置:雨林木風(fēng)下載站 > 技術(shù)開發(fā)教程 > 詳細(xì)頁面

        不用組件完成上載技巧(1)

        不用組件完成上載技巧(1)

        更新時間:2022-05-13 文章作者:未知 信息來源:網(wǎng)絡(luò) 閱讀次數(shù):

        '---- file name /upaoad.asp/

        <%
        Public Function BuildUploadRequest(strRequestBin)
            Dim PosBeg, PosEnd, boundary, boundaryPos
            'Get the boundary
            PosBeg = 1
            PosEnd = InstrB(PosBeg,strRequestBin,getByteString(chr(13)))
            boundary = MidB(strRequestBin,PosBeg,PosEnd-PosBeg)
            boundaryPos = InstrB(1,strRequestBin,boundary)

            'Get all data inside the boundaries
            Do until (boundaryPos = InstrB(strRequestBin,boundary & getByteString("--")))
                'Members variable of objects are put in a dictionary object
                Dim UploadControl
                Set UploadControl = CreateObject("Scripting.Dictionary")
                
                Dim Pos, Name
                'Get an object name
                Pos = InstrB(boundaryPos,strRequestBin,getByteString("Content-Disposition"))
                Pos = InstrB(Pos,strRequestBin,getByteString("name="))
                PosBeg = Pos + Len("name=") + 1
                PosEnd = InstrB(PosBeg,strRequestBin,getByteString(chr(34)))
                Name = getString(MidB(strRequestBin,PosBeg,PosEnd-PosBeg))

                Dim PosFile, PosBound, ContentType, Value
                'Test if object is of file type
                PosFile = InstrB(BoundaryPos,strRequestBin,getByteString("filename="))
                PosBound = InstrB(PosEnd,strRequestBin,boundary)

                If  PosFile <> 0 AND PosFile < PosBound Then
                    'Get FilePathName of the file
                    PosBeg = PosFile + Len("filename=") + 1
                    PosEnd =  InstrB(PosBeg,strRequestBin,getByteString(chr(34)))
                    FilePathName = getString(MidB(strRequestBin,PosBeg,PosEnd-PosBeg))
                    
                    'Add filename(with path) to dictionary object
                    UploadControl.Add "FilePathName", FilePathName

                    'Get Content-Type of the file
                    Pos = InstrB(PosEnd,strRequestBin,getByteString("Content-Type:"))
                    PosBeg = Pos + Len("Content-Type:") + 1
                    PosEnd = InstrB(PosBeg,strRequestBin,getByteString(chr(13)))
                    ContentType = getString(MidB(strRequestBin,PosBeg,PosEnd-PosBeg))

                    'Add content-type to dictionary object
                    UploadControl.Add "ContentType",ContentType
                    
                    'Get content of object
                    PosBeg = PosEnd + 4
                    PosEnd = InstrB(PosBeg,strRequestBin,boundary)-2
                    Value = MidB(strRequestBin,PosBeg,PosEnd-PosBeg)
                Else
                    'Get content of object
                    Pos = InstrB(Pos,strRequestBin,getByteString(chr(13)))
                    PosBeg = Pos + 4
                    PosEnd = InstrB(PosBeg,strRequestBin,boundary)-2
                    Value = getString(MidB(strRequestBin,PosBeg,PosEnd-PosBeg))
                End If

                'Add content to dictionary object
                UploadControl.Add "Value" , Value

                'Add dictionary object to main dictionary
                Set UploadRequest(Name) = UploadControl

                'Loop to next object
                BoundaryPos = InstrB(BoundaryPos+LenB(boundary),strRequestBin,boundary)
            Loop
        End Function

        'String to byte string conversion
        Public Function getByteString(strString)
            Dim intCount

            getByteString = ""

            For intCount = 1 to Len(strString)
                getByteString = getByteString & chrB(AscB(Mid(strString,intCount,1)))
            Next
        End Function

        'Byte string to string conversion
        Public Function getString(strString)
            Dim intCount

            getString = ""

            For intCount = 1 to LenB(strString)
                getString = getString & chr(AscB(MidB(strString,intCount,1)))
            Next
        End Function
        %>

        溫馨提示:喜歡本站的話,請收藏一下本站!

        本類教程下載

        系統(tǒng)下載排行

        主站蜘蛛池模板: 高清一区二区三区免费视频| 特级毛片在线大全免费播放| 一级成人a毛片免费播放| 怡红院亚洲怡红院首页| 中文字幕在线视频免费观看| 亚洲色大成网站www永久一区 | 亚洲AV成人精品日韩一区| 妞干网免费观看视频| 亚洲精品色播一区二区| 四虎永久免费地址在线观看| 免费国产高清毛不卡片基地 | 国产精品黄页在线播放免费| 美女视频黄.免费网址| 国产专区一va亚洲v天堂| 少妇性饥渴无码A区免费| 亚洲一区综合在线播放| 国产一卡二卡3卡四卡免费| 亚洲精品无码av中文字幕| 国产免费午夜a无码v视频| av电影在线免费看| 亚洲国产美国国产综合一区二区| 真人做A免费观看| 美女黄色免费网站| 亚洲AV无码乱码国产麻豆| 免费专区丝袜脚调教视频| 久久亚洲精品无码网站| 精品国产亚洲一区二区三区| 最近2019中文字幕免费大全5| 亚洲欧洲日产国码久在线| 国产亚洲精品高清在线| 国产在线观看免费观看不卡| 日韩在线视频免费| 亚洲视频网站在线观看| 永久黄网站色视频免费观看| 中文字幕免费播放| 亚洲精品亚洲人成在线播放| 亚洲一区日韩高清中文字幕亚洲 | 亚洲av女电影网| 免费看美女让人桶尿口| 伊人久久大香线蕉免费视频| 亚洲中文字幕一二三四区苍井空|