我在symfony2应用程序中使用内置SOAP-Server,在处理StdClass-Object之后,我需要读取收到的用于调试和记录的完整xml.有没有办法简单地捕获转移的xml?它应该在请求标题中的某个位置,但我根本找不到它.
小智 19
我一直在找同样的东西,终于找到了.希望这可以帮助你或其他人.
$postdata = file_get_contents("php://input");
Run Code Online (Sandbox Code Playgroud)
该$postdata变量将具有原始XML.通过以下两个链接找到:
http://php.net/manual/en/reserved.variables.httprawpostdata.php
http://php.net/manual/en/soapserver.soapserver.php