Answers for "json_decode(file_get_contents('php //input') true) null"

PHP
0

json_decode(file_get_contents('php //input') true) null

if($_SERVER["REQUEST_METHOD"] == "POST" && $_SERVER["CONTENT_TYPE"] == "application/json")
{
  $data = file_get_contents("php://input", false, stream_context_get_default(), 0, $_SERVER["CONTENT_LENGTH"]);
  global $_POST_JSON;
  $_POST_JSON = json_decode($_REQUEST["JSON_RAW"],true);

  // merge JSON-Content to $_REQUEST 
  if(is_array($_POST_JSON)) $_REQUEST   = $_POST_JSON+$_REQUEST;
}
Posted by: Guest on July-22-2021

Code answers related to "json_decode(file_get_contents('php //input') true) null"

Browse Popular Code Answers by Language