Java 在PHP中读取post方法的数据
我向PHP服务器请求如下代码片段Java 在PHP中读取post方法的数据,java,php,android,Java,Php,Android,我向PHP服务器请求如下代码片段 StringEntity stringEntity = new StringEntity(myString, "UTF-8"); httppost.setEntity(stringEntity); httppost.addHeader("Accept", "application/xml"); httppost.addHeader("Content-Type", "application/xml"); 现在我想将xml数据读入PHP服务器 我怎么能看出来 $
StringEntity stringEntity = new StringEntity(myString, "UTF-8");
httppost.setEntity(stringEntity);
httppost.addHeader("Accept", "application/xml");
httppost.addHeader("Content-Type", "application/xml");
现在我想将xml数据读入PHP服务器
我怎么能看出来
$xmlstr= file_get_contents('php://input');
$xml = new SimpleXMLElement($xmlstr);
var_dump($xml )