开发者

Read data of post method in PHP

I am requesting to PHP server as below code snippet

StringEntity stringEntity = new StringEntity(myString, "UTF-8"); 
httppost.setEntity(stringEntity);
httppost.addHeader("Accept", "applic开发者_如何学运维ation/xml");
httppost.addHeader("Content-Type", "application/xml");

Now I want to read that xml data into PHP server.

How can I read that?


$xmlstr= file_get_contents('php://input');
$xml = new SimpleXMLElement($xmlstr);
var_dump($xml )
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜