Answers for "set php file as json header"

PHP
6

php header json

header('Content-Type: application/json');
echo json_encode($data);
Posted by: Guest on March-03-2021
2

php file get content json

$json = file_get_contents('php://input',true);
$post = json_decode($json,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
Posted by: Guest on October-01-2021

Browse Popular Code Answers by Language