file_get_contents("php http://input”
or $HTTP_RAW_POST_DATA
- which one is better to have the Body of JSON request?
哪一类请求(GET
或POST
)?
My question was inspired from this answer: How to post JSON to PHP with curl
回答:
从礼宾角度看,
file_get_contents("php http://input”)
实际上更加正确,因为你没有真正处理http:// multipart form data noway。