人人做人人澡人人爽欧美,国产主播一区二区,久久久精品五月天,羞羞视频在线观看免费

當前位置:蘿卜系統(tǒng)下載站 > 技術開發(fā)教程 > 詳細頁面

《無組件上傳文件》

《無組件上傳文件》

更新時間:2019-04-27 文章作者:未知 信息來源:網(wǎng)絡 閱讀次數(shù):

我只是照搬過來的,我也是剛找到。我自己還沒看明白源碼呢。:)<br>
你只有自己修改了。我把整個網(wǎng)頁一起貼過來吧。誰英文好翻譯一下。<br>
一頁貼不下,分兩頁。<br>
Upload Form<br>
Usually, you use an HTML FORM to submit data from the browser to the web server. That form can contain text fields, checkbox, button and also a file type control to upload files. The user fills in the form with his data and submits the form to the server.<br>
<br>
The enctype attribute of the &lt;FORM&gt; element specifies the content type used to encode the form data set for submission to the server. The enctype attribute used by default is &quot; application/x-www-form-urlencoded &quot;. However, that enctype is inefficient for sending large quantities of text, text containing non-ASCII characters or binary data to the server. The content type &quot; multipart/form-data &quot; should be used to submit forms in case of file uploading. Actually, it can be used to submit files and binary data. <br>
<br>
A &quot; multipart/form-data &quot; message contains a series of parts, where each part is expected to contain: <br>
<br>
a Content-Disposition header whose value is &quot; form-data &quot; <br>
a name attribute specifying the control name. <br>
For a file type control, the part contains some more information:<br>
<br>
a filename attribute specifying the original path and file name on the client <br>
a Content-Type header of the binary data control sent. <br>
Those headers are followed by the binary or text content of the control.<br>
<br>
The following example illustrates &quot; multipart/form-data &quot; encoding. The client would have this form in the browser: <br>
<br>
&lt;FORM METHOD=&quot;POST&quot; ENCTYPE=&quot;multipart/form-data&quot; ACTION=&quot;upload.asp&quot;&gt;<br>
&lt;INPUT TYPE=&quot;Text&quot; NAME=&quot;email&quot; VALUE=&quot;PhCollignon@email.com&quot;&gt;&lt;BR&gt;<br>
&lt;INPUT TYPE=&quot;file&quot; NAME=&quot;blob&quot;&gt;&lt;BR&gt;<br>
&lt;INPUT TYPE=&quot;submit&quot; NAME=&quot;Enter&quot;&gt;<br>
&lt;/FORM&gt;<br>
<br>
<br>
<br>
If this form is submitted, the following request can be read on the server:<br>
<br>
-----------------------------7cf87224d2020a <br>
Content-Disposition: form-data; name=&quot;email&quot; <br>
<br>
PhCollignon@email.com<br>
-----------------------------7cf87224d2020a<br>
Content-Disposition: form-data; name=&quot;blob&quot;; filename=&quot;c:\image.gif&quot;<br>
Content-Type: image/pjpeg <br>
<br>
&yuml;&Oslash;&yuml;àJFIFHH&yuml;&Ucirc;C…<br>
…&yuml;&Ugrave; <br>
-----------------------------7cf87224d2020a <br>
Content-Disposition: form-data; name=&quot;Enter&quot; <br>
<br>
Submit Query <br>
-----------------------------7cf87224d2020a-- <br>
<br>
That content can be displayed if it is sent back as a response to the client. The binary data should be read and written with Request.binaryRead and Response.binaryWrite methods.<br>
<br>
&lt;%<br>
Response.BinaryWrite(Request.BinaryRead(Request.TotalBytes))<br>
%&gt;<br>
<br>
You can see that parts of the response are delimited by boundaries:<br>
<br>
-----------------------------7cf87224d2020a<br>
<br>
and the last boundary is followed by: ' -- ' <br>
<br>
<br>
There is one Content-Disposition for each control. The name attribute identifies the control sent by the HTML form (email, blob and Enter). For a file type control (blob), the file name is also part of Content-Disposition header and, a Content-Type header gives the content type of the binary data. <br>
<br>

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

本類教程下載

系統(tǒng)下載排行

網(wǎng)站地圖xml | 網(wǎng)站地圖html
主站蜘蛛池模板: 和平县| 成都市| 怀仁县| 五指山市| 霞浦县| 清丰县| 浪卡子县| 桐柏县| 定边县| 拜泉县| 易门县| 江北区| 庆城县| 金乡县| 永胜县| 西和县| 恩平市| 无锡市| 鲜城| 桦南县| 广水市| 嘉义市| 四子王旗| 渝北区| 靖西县| 石渠县| 聂拉木县| 乌苏市| 新巴尔虎左旗| 蕉岭县| 安达市| 闽清县| 尚义县| 蓝田县| 六枝特区| 达日县| 贵港市| 夏邑县| 邯郸县| 育儿| 东乌珠穆沁旗|