android下传图片到PHP的有关问题

WBOY
Release: 2016-06-13 13:18:29
Original
789 people have browsed it

android上传图片到PHP的问题
我通过post上传数据到PHP客户端,HttpPost httpPost = new HttpPost(url + "?" + query);这个方法传的是参数和URL地址
例如http://192.168.1.12/mapi/?api="aa"&name="bb"

InputStreamEntity inEntity = new InputStreamEntity(stream, stream.available());
httpPost.setEntity(inEntity )
然后用这个方法上传图片的流到服务器,都在一个请求里面
问题是,我php端如何获得上传图片的这个流,上面的参数都可以通过key来获得,我标红的图片流该如何获得,求解答

------解决方案--------------------
我觉得你直接上传后,然后返回参数与php交互好点
------解决方案--------------------
$_FILE变量有值的话,就有提交文件
------解决方案--------------------
上传部分可以让android来完成么?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template