How can I read content of Request Payload (POST) using PHP?
I´m using a Angular aplication to send the POST.
I've tried with: $_POST
, $_FILES
and file_get_contents('php://input')
...
None worked.
How can I read content of Request Payload (POST) using PHP?
I´m using a Angular aplication to send the POST.
I've tried with: $_POST
, $_FILES
and file_get_contents('php://input')
...
None worked.
If you need view x-www-form-urlencoded post data, just use
print_r($_POST);
If you need view json post data, use this
$data=json_decode(file_get_contents('php://input'),1);
print_r($data);