PHP获取request payload(在header中)的方法

WBOY
Release: 2016-06-23 13:17:28
Original
2939 people have browsed it

在ajax请求后,怎么也获取不到post数据,用request也不能取到。最后查看一下控制台,发现参数都是在request payload下,难怪。下面解决办法:

file_get_contents( "php://input")
Copy after login

不过,我还是建议,如果不是特殊要求,还是正常的POST吧。

保健食品注册咨询专家

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