>  기사  >  백엔드 개발  >  php5.6 的post方法废弃,如何使用?

php5.6 的post方法废弃,如何使用?

WBOY
WBOY원래의
2016-06-23 13:02:441268검색

 Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0


回复讨论(解决方案)

你为什么不去看他的发版说明呢?再说,手册中也有明确的说明:
http://php.net/manual/zh/reserved.variables.httprawpostdata.php

$_POST

使用这个代替:
file_get_contents('php://input');

参考: http://blog.csdn.net/fdipzone/article/details/40098169

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.