我有这些代码, p>
var obj ='{ “项目”:[{ “编码”: “C101”, “说明”: “驾驶”}]} '; \ N $。员额(' 获取项,OBJ,函数(){
}) ;
code> pre>
我使用了这段代码, p>
file_get_contents('php:// input')
< / code> pre>
因为我无法获取发送的POST数据。
使用上面的代码,我得到原始的POST数据。 p>
如何在不使用file_get_contents('php:// input')的情况下读取发送的数据?
因为我无法使用file_get_contents('php:// input')。 p>
这是我的Laravel控制器函数, p>
public function getItems()
{
$ data = file_get_contents('php:// 输入');
if(isset($ data))
{
...
}
}
code> pre>
div>