PHP 以POST方式提交XML、获取XML,解析XML详解及实例
PHP 以POST方式提交XML、获取XML,最后解析XML以POST方式提交XML //$data = array('name' => 'Dennis','surname' => 'Pallett'); // create a new curl resource 获取POST来到XML,并解析handle_form.php $file_in = file_get_contents("php://input"); //接收post数据
$xml = simplexml_load_string($file_in);//转换post数据为simplexml对象 foreach($xml->children() as $child) //遍历所有节点数据 echo $child->getName() . ": " . $child . " //if($child->getName()=="from") //捡取要操作的节点 exit; 感谢阅读,希望能帮助到大家,谢谢大家对本站的支持! (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |