如何在 php 中接受 XML 发布请求


How to accept XML post request in php?

对于Android应用程序,数据需要作为xml请求发布到php文件。如何在 php 端读取 XML 请求。

使用 php://input 和 file_get_contents() 获取原始输入。

$content = file_get_contents('php://input');