开发者

Read data of post method in PHP

开发者 https://www.devze.com 2023-03-30 11:52 出处:网络
I am requesting to PHP server as below code snippet StringEntity stringEntity = new StringEntity(myString, \"UTF-8\");

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

精彩评论

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