web校园新闻系统课程设计(18)
发布时间:2021-06-07
发布时间:2021-06-07
web校园新闻系统课程设计
}
'数据起始位置:2个CRLF开始
DataStart = InStrB(PosOpenBoundary,FormData,str2bin(VbCrLf & VbCrLf)) + 4
If FormFileName 〈〉 "" Then
B(DataStart,FormData,DivStr) - DataStart - 1
FormFieldData = MidB(FormData,DataStart,DataSize)
Else
'数据长度,减2是因为分隔标志串前有一个CRLF
DataSize = InStrB(DataStart,FormData,DivStr) - DataStart - 2 FormFieldData = bin2str(MidB(FormData,DataStart,DataSize)) End If
'建立一个Dictionary集存储Form中各个Field的相关数据 Set Field = CreateUploadField()
= FormFieldName
Field.FilePath = FormFileName
Field.FileName = GetFileName(FormFileName)
Field.ContentType = FormFileCT
Field.Length = LenB(FormFieldData)
Field.Value = FormFieldData
Fields.Add FormFieldName, Field
PosOpenBoundary = PosCloseBoundary
PosCloseBoundary = InStrB(PosOpenBoundary + 1,FormData,DivStr) Wend
Set GetUpload = Fields
End Function
'把二进制字符串转换成普通字符串函数
Function bin2str(binstr)
Dim varlen,clow,ccc,skipflag
'中文字符Skip标志
skipflag=0
ccc = ""
If Not IsNull(binstr) Then
varlen=LenB(binstr)
For i=1 To varlen
If skipflag=0 Then
clow = MidB(binstr,i,1)
~ 20 ~
上一篇:宣德瓷器真伪鉴定 图
下一篇:精选最新律师实习周记范文4篇