• <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免费观看| 日韩成全视频观看免费观看高清| 亚洲三级电影网址| 久久精品视频免费播放| 久久精品亚洲中文字幕无码网站| 91视频免费网站| 久久亚洲高清观看| 亚洲电影免费在线观看| 亚洲最新视频在线观看| 无码国产精品一区二区免费式影视| 亚洲精品第五页中文字幕| 国产精品爱啪在线线免费观看| 亚洲中文无码a∨在线观看| 一区二区三区免费在线观看| 国产不卡免费视频| 亚洲国产日韩在线视频| 午夜爽爽爽男女免费观看影院| 亚洲视频在线观看地址| 97人伦色伦成人免费视频| 亚洲AV无码资源在线观看| 久艹视频在线免费观看| 亚洲福利视频网站| 白白国产永久免费视频| 春意影院午夜爽爽爽免费| 久久久久亚洲av无码尤物| 一道本不卡免费视频| 亚洲av无码国产精品色午夜字幕 | 久久亚洲av无码精品浪潮| 久久亚洲精品无码AV红樱桃| 久久这里只有精品国产免费10| 爱情岛论坛亚洲品质自拍视频网站| 91麻豆精品国产自产在线观看亚洲| 欧美激情综合亚洲一二区| 国产国拍精品亚洲AV片| 中文字幕在线观看免费视频 | 亚洲精品无码久久久久久久| 日韩成人免费在线| 中文字幕乱理片免费完整的| 亚洲日本人成中文字幕| 久久影院亚洲一区|