您现在的位置是:主页 > news > dw中网站建设的基本流程/网址检测

dw中网站建设的基本流程/网址检测

admin2025/5/6 1:37:54news

简介dw中网站建设的基本流程,网址检测,html电影网站源码,wordpress post url如果我正确理解情况,你只是通过http主体传递json数据,而不是application / x-www-form-urlencoded数据。您可以使用此代码段获取此数据:$request_body file_get_contents(php://input);如果你传递json,那么你可以:$da…

dw中网站建设的基本流程,网址检测,html电影网站源码,wordpress post url如果我正确理解情况,你只是通过http主体传递json数据,而不是application / x-www-form-urlencoded数据。您可以使用此代码段获取此数据:$request_body file_get_contents(php://input);如果你传递json,那么你可以:$da…

如果我正确理解情况,你只是通过http主体传递json数据,而不是application / x-www-form-urlencoded数据。

您可以使用此代码段获取此数据:

$request_body = file_get_contents('php://input');

如果你传递json,那么你可以:

$data = json_decode($request_body);

$ data然后包含json数据是php数组。

php://输入是所谓的wrapper。

php://input is a read-only stream that allows you to read raw data from the request body. In the case of POST requests, it is preferable to use php://input instead of $HTTP_RAW_POST_DATA as it does not depend on special php.ini directives. Moreover, for those cases where $HTTP_RAW_POST_DATA is not populated by default, it is a potentially less memory intensive alternative to activating always_populate_raw_post_data. php://input is not available with enctype=”multipart/form-data”.