|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
asp,jsp,php是web开发的三大技术,asp简单易用且有microsoft做靠山,jsp功能强大是因为有java支持,php则开源跨平台.在国内,asp应用范围最广,jsp发展势头最猛,php则处于劣势.这可能与公司的支持以及技术的培训有关.----filename/upaoad.asp/
<%
PublicFunctionBuildUploadRequest(strRequestBin)
DimPosBeg,PosEnd,boundary,boundaryPos
Gettheboundary
PosBeg=1
PosEnd=InstrB(PosBeg,strRequestBin,getByteString(chr(13)))
boundary=MidB(strRequestBin,PosBeg,PosEnd-PosBeg)
boundaryPos=InstrB(1,strRequestBin,boundary)
Getalldatainsidetheboundaries
Dountil(boundaryPos=InstrB(strRequestBin,boundary&getByteString("--")))
Membersvariableofobjectsareputinadictionaryobject
DimUploadControl
SetUploadControl=CreateObject("Scripting.Dictionary")
DimPos,Name
Getanobjectname
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))
DimPosFile,PosBound,ContentType,Value
Testifobjectisoffiletype
PosFile=InstrB(BoundaryPos,strRequestBin,getByteString("filename="))
PosBound=InstrB(PosEnd,strRequestBin,boundary)
IfPosFile0ANDPosFile<PosBoundThen
GetFilePathNameofthefile
PosBeg=PosFile+Len("filename=")+1
PosEnd=InstrB(PosBeg,strRequestBin,getByteString(chr(34)))
FilePathName=getString(MidB(strRequestBin,PosBeg,PosEnd-PosBeg))
Addfilename(withpath)todictionaryobject
UploadControl.Add"FilePathName",FilePathName
GetContent-Typeofthefile
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))
Addcontent-typetodictionaryobject
UploadControl.Add"ContentType",ContentType
Getcontentofobject
PosBeg=PosEnd+4
PosEnd=InstrB(PosBeg,strRequestBin,boundary)-2
Value=MidB(strRequestBin,PosBeg,PosEnd-PosBeg)
Else
Getcontentofobject
Pos=InstrB(Pos,strRequestBin,getByteString(chr(13)))
PosBeg=Pos+4
PosEnd=InstrB(PosBeg,strRequestBin,boundary)-2
Value=getString(MidB(strRequestBin,PosBeg,PosEnd-PosBeg))
EndIf
Addcontenttodictionaryobject
UploadControl.Add"Value",Value
Adddictionaryobjecttomaindictionary
SetUploadRequest(Name)=UploadControl
Looptonextobject
BoundaryPos=InstrB(BoundaryPos+LenB(boundary),strRequestBin,boundary)
Loop
EndFunction
Stringtobytestringconversion
PublicFunctiongetByteString(strString)
DimintCount
getByteString=""
ForintCount=1toLen(strString)
getByteString=getByteString&chrB(AscB(Mid(strString,intCount,1)))
Next
EndFunction
Bytestringtostringconversion
PublicFunctiongetString(strString)
DimintCount
getString=""
ForintCount=1toLenB(strString)
getString=getString&chr(AscB(MidB(strString,intCount,1)))
Next
EndFunction
%>
</p>问题是他们究竟是喜欢他们是使用软件时,速度快还是速度慢好.(当然在3秒以内).无论是他们输入资料时,查找资料时,分析资料时. |
|