php - 如何访问帖子变量($_POST 为空)

CdB*_*CdB 5 php post json

我正在研究一个系统,目前正在尝试实现一个脚本,另一个(外部)系统可以将其发布到某些数据,以便我可以存储它们。
我无法控制外部系统 - 我可以触发它向我的系统发布数据,并为其提供我的脚本 url。

在发布时查看萤火虫,我可以看到发布的数据,如下所示:在此处输入图片说明

或(网址解码)

content={"sex":"male","person":{"name":["chris"],"mbox":["mailto:name.lastename@gmail.com"]}}  
&Content-Type=application/json  
&auth=DDE233H76BGN
Run Code Online (Sandbox Code Playgroud)

我的问题是,当试图在我的脚本中获取这些参数时,$_POST(和 $_REQUEST)始终为空!
我试过var_dump($_POST)echo file_get_contents("php://input");,但我没有看到任何内容。

我在这里缺少什么?
我不知道是否需要响应/请求标头才能从中获取一些信息,我在这里展示它们以防万一
在此处输入图片说明

编辑:
我的脚本现在由一行代码组成,例如:

<?php
    var_dump($_POST);
?>
Run Code Online (Sandbox Code Playgroud)

或者

<?php
   echo file_get_contents("php://input");
?>
Run Code Online (Sandbox Code Playgroud)

他们俩都没有给我任何东西:s

Ziu*_*min 0

让我们看看 RFC 1945 看看什么是“参数”

parameter      = attribute "=" value
attribute      = token
token          = 1*<any CHAR except CTLs or tspecials>
CTL            = <any US-ASCII control character
                    (octets 0 - 31) and DEL (127)>
Run Code Online (Sandbox Code Playgroud)

所以我认为“Content-Type=application/json”不是 POST 的有效部分,因为“-”不是 CTL