我正在尝试通过android中的post方法发送数据。但我如何在服务器中接收数据。我的服务器在php中。我在php $ _post []中找到了一个方法。我怎么用呢? 我的客户代码是
client=new DefaultHttpClient();
HttpPost request=new HttpPost("http://10.0.2.2/php_server/index.php");
HttpEntity entity;
try
{
StringEntity string=new StringEntity("I am android");
entity=string;
request.setEntity(entity);
HttpResponse response=client.execute(request);
}
catch(Exception e)
{
Log.e("socket connection", e.toString());
}