好好爱自己!

php 的$_POST 和$_REQUEST的区别

发现$_POST 没数据,而$_REQUEST 有数据

 

 

-----------------------------------------

https://stackoverflow.com/questions/26928393/php-post-is-empty-but-http-raw-post-data-has-all-data

The POST data must be in query string or multipart/form-data format to get decoded properly. Your data seems to be JSON, so you have to decode it by yourself:

$_POST = json_decode(file_get_contents('php://input'), true);
posted @ 2018-04-18 17:40  立志做一个好的程序员  阅读(569)  评论(0)    收藏  举报

不断学习创作,与自己快乐相处