PHP 8.5.0 Beta 1 available for testing

Voting

: max(zero, three)?
(Example: nine)

The Note You're Voting On

php (at) vxvr /dot de
4 years ago
If you want to receive application/json post data in your script you can not use $_POST. $_POST does only handle form data.
Read from php://input instead. You can use fopen or file_get_contents.

Example:

<?php
// Get the JSON contents
$json = file_get_contents('php://input');

// decode the json data
$data = json_decode($json);
?>

<< Back to user notes page

To Top