小编edu*_*liu的帖子

使用POST android发送php数组

我想通过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();
Run Code Online (Sandbox Code Playgroud)

我认为php数组可能会进入 StringEntity dades = new StringEntity(data); (数据是php数组).谁能帮我?

php arrays post android http-post

5
推荐指数
2
解决办法
1万
查看次数

标签 统计

android ×1

arrays ×1

http-post ×1

php ×1

post ×1