【发布时间】:2012-02-25 09:57:01
【问题描述】:
我想通过 POST 从 android 发送一个 php 数组到 php 服务器,我有这个代码
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
StringEntity dades = new StringEntity(data);
httppost.setEntity(dades);
// Execute HTTP Post Request
HttpResponse response = httpclient.execute(httppost);
HttpEntity resEntity = response.getEntity();
return resEntity.getContent();
我认为php数组可能是可以进去的
StringEntity dades = new StringEntity(data);
(数据是php数组)。谁能帮帮我?
【问题讨论】:
-
我通常这样做androidsnippets.com/…
-
@jsaye: 有资格作为答案,把代码,一些解释链接下来以获得一些代表
-
@konsolenfreddy:谢谢你的建议,我真的是新来的,有时我不知道该怎么办
-
@jsaye:别担心,不过很好找!
标签: php android arrays post http-post