从文件获取内容(';php://input');

从文件获取内容(';php://input');,php,api,codeigniter,Php,Api,Codeigniter,我正在使用文件获取内容('php://input)函数。如何将以下数据转换为数组 Content-Disposition: form-data; name="accessKey" test12313 -----------------------------2154836642318 Content-Disposition: form-data; name="username" test123 -----------------------------2154836642318-- 答案是

我正在使用
文件获取内容('php://input)
函数。如何将以下数据转换为数组

Content-Disposition: form-data; name="accessKey"

test12313
-----------------------------2154836642318
Content-Disposition: form-data; name="username"

test123
-----------------------------2154836642318--

答案是通过知道该问什么来找到的:


您也许可以使用PHP的parse_str函数,但是当您跟随我的链接时,会有一个自定义解决方案和指向它的链接的讨论。

进入哪个数组?只是想尝试一下,我很困惑。这应该是一个标准的
多部分/表单数据
请求吗?如果是,为什么需要复制PHP的内置解析器?如果不是,具体的区别是什么?