File "save_objet_tache001.php"

Full Path: /home/analogde/www/Chart burndown/save_objet_tache001.php
File size: 423 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
header('Content-Type: application/json');

$input = file_get_contents('php://input');
$data = json_decode($input, true);

if (json_last_error() === JSON_ERROR_NONE) {
    $file = 'objet_tache.json';
    file_put_contents($file, json_encode($data, JSON_PRETTY_PRINT));
    echo json_encode(['status' => 'success']);
} else {
    echo json_encode(['status' => 'error', 'message' => 'Invalid JSON']);
}
?>