ASIFormDataRequest上传文件之研究
2014-05-19 14:08
483 查看
分类: 嵌入式如果想同时post字符串以及文件到服务器,则在网页中一定要设置 enctype="multipart/form-data".html测试页面:
此时,使用Firefox的Tamper Data附加组件,是看不到上传文件的过程的,只能看到post信息里面的文件名称。而,在ASI中,这个multipart部分应该是自己给添加上的。iPhone代码:
服务器php代码:
服务器返回Log:
<html> <body> <form action="http://www.test_letv.com/file.php" method="post"enctype="multipart/form-data"> <input type=text name="name" /> <input type=file name="file1" /> <input type="submit" /> </form> </body> </html> |
NSString *fileName = [[NSBundle |
<?phpvar_dump($_FILES);$header = print_r(apache_request_headers(), true);echo $header; |
2011-08-07 18:33:36.991 |
相关文章推荐
- iOS - ASI - ASIFormDataRequest 上传文件到服务器(转载)
- iPhone开发笔记(11)用ASIFormDataRequest实现图片上传
- ASIFormDataRequest的使用——上传下载
- IOS成长之路-ASIFormDataRequest实现上传图片
- IOS成长之路-ASIFormDataRequest实现上传图片
- IOS 上传图片 ASIFormDataRequest
- ASIFormDataRequest 上传图片
- iPhone开发笔记(11)用ASIFormDataRequest实现图片上传
- 好久没写了,今天写个iOS用ASIFormDataRequest实现图片上传
- IOS网络请求之ASIFormDataRequest 上传数据
- 【IOS学习之路】关于GPRS下上传文件,ASIFormDataRequest在2G网络下上传失败(已解决)iphone开发
- IOS成长之路-ASIFormDataRequest实现上传图片
- iOS用ASIFormDataRequest实现图片上传
- IOS成长之路-ASIFormDataRequest实现上传图片
- ASIFormDataRequest 上传语音
- iOS ASIFormDataRequest上传图片 前后台代码
- ios ASIFormDataRequest上传图片到php服务器
- ASIFormDataRequest实现上传图片
- ASIFormDataRequest 上传图片
- iOS用ASIFormDataRequest实现图片上传