Multipart/form-data POST文件上传详解
理论
简单的HTTP POST
大家通过HTTP向服务器发送POST请求提交数据,都是通过form表单提交的,代码如下:
<form method="post"action="http://w.sohu.com" >
<inputtype="text" name="txt1">
<inputtype="text" name="txt2">
</form>
提交时会向服务器端发出这样的数据(已经去除部分不相关的头信息),数据如下:
POST / HTTP/1.1
Content-Type:application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Host: w.sohu.com
Content-Length: 21
Connection: Keep-Alive
Cache-Control: no-cache
txt1=hello&txt2=world
上面是在网站找到的额,如何转化成狐表的语言方式呢?求教了