php如何解析别人POST过来的body

WBOY
Release: 2016-06-13 12:26:17
Original
1801 people have browsed it

php怎么解析别人POST过来的body?
请问 如何解决C#post过来的数据 他说放在body里面  让我的接口调用 该如何实现拿到里面的数据 ? 求代码实例
------解决思路----------------------
file_put_contents('test.txt', print_r($_POST, 1));

看看文件内容
------解决思路----------------------
$post = file_get_contents("php://input");
var_dump($post);
------解决思路----------------------

<br /><?php<br />$data = $_POST;<br />file_put_contents('data.txt', json_encode($data), true);<br />?><br />
Copy after login


对方post后,看看data.txt有什么内容。
------解决思路----------------------
放在body post就是在header把二进制post过来。
参考:http://blog.csdn.net/fdipzone/article/details/40098169

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template