|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
缺点:正版成本价格贵(盗版就不说了)、不够安全,大多数服务器用windows系统,没有linux安全上传|无组件我只是照搬过去的,我也是刚找到。我本人还没看分明源码呢。:)<br>
你只要本人修正了。我把全部网页一同贴过去吧。谁英文好翻译一下。<br>
一页贴不下,分两页。<br>
UploadForm<br>
Usually,youuseanHTMLFORMtosubmitdatafromthebrowsertothewebserver.Thatformcancontaintextfields,checkbox,buttonandalsoafiletypecontroltouploadfiles.Theuserfillsintheformwithhisdataandsubmitstheformtotheserver.<br>
<br>
Theenctypeattributeofthe<FORM>elementspecifiesthecontenttypeusedtoencodetheformdatasetforsubmissiontotheserver.Theenctypeattributeusedbydefaultis"application/x-www-form-urlencoded".However,thatenctypeisinefficientforsendinglargequantitiesoftext,textcontainingnon-ASCIIcharactersorbinarydatatotheserver.Thecontenttype"multipart/form-data"shouldbeusedtosubmitformsincaseoffileuploading.Actually,itcanbeusedtosubmitfilesandbinarydata.<br>
<br>
A"multipart/form-data"messagecontainsaseriesofparts,whereeachpartisexpectedtocontain:<br>
<br>
aContent-Dispositionheaderwhosevalueis"form-data"<br>
anameattributespecifyingthecontrolname.<br>
Forafiletypecontrol,thepartcontainssomemoreinformation:<br>
<br>
afilenameattributespecifyingtheoriginalpathandfilenameontheclient<br>
aContent-Typeheaderofthebinarydatacontrolsent.<br>
Thoseheadersarefollowedbythebinaryortextcontentofthecontrol.<br>
<br>
Thefollowingexampleillustrates"multipart/form-data"encoding.Theclientwouldhavethisforminthebrowser:<br>
<br>
<FORMMETHOD="POST"ENCTYPE="multipart/form-data"ACTION="upload.asp"><br>
<INPUTTYPE="Text"NAME="email"VALUE="PhCollignon@email.com"><BR><br>
<INPUTTYPE="file"NAME="blob"><BR><br>
<INPUTTYPE="submit"NAME="Enter"><br>
</FORM><br>
<br>
<br>
<br>
Ifthisformissubmitted,thefollowingrequestcanbereadontheserver:<br>
<br>
-----------------------------7cf87224d2020a<br>
Content-Disposition:form-data;name="email"<br>
<br>
PhCollignon@email.com<br>
-----------------------------7cf87224d2020a<br>
Content-Disposition:form-data;name="blob";filename="c:image.gif"<br>
Content-Type:image/pjpeg<br>
<br>
|
|