Files
martinfencl.eu/ADF/saveData.php
fencl 448fca2c21 .
2024-01-02 11:29:03 +01:00

16 lines
440 B
PHP

<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$data = json_decode(file_get_contents('php://input'), true);
// Uložte hodnotu obličeje (a další data) na serveru
file_put_contents('data.json', json_encode($data));
echo json_encode(['success' => true]);
} else {
echo json_encode(['error' => 'Invalid request method']);
}
// Ladící výstup
error_log(print_r($_POST, true));
error_log(print_r($_FILES, true));