Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
Diabete
/
Provisoire
:
script_read.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php header('Content-Type: application/json'); $data = json_decode(file_get_contents('php://input'), true); if (isset($data['fileName'])) { $fileName = $data['fileName']; // $filePath = 'path_to_save/' . $fileName . '.json'; // Remplacez 'path_to_save' par le chemin où vous avez sauvegardé le fichier //$filePath = $fileName . '.json'; // Remplacez 'path_to_save' par le chemin où vous avez sauvegardé le fichier $filePath = $fileName ;// Remplacez 'path_to_save' par le chemin où vous avez sauvegardé le fichier if (file_exists($filePath)) { $fileContent = file_get_contents($filePath); echo json_encode(['status' => 'success', 'data' => json_decode($fileContent, true)]); } else { echo json_encode(['status' => 'error', 'message' => 'Le fichier n\'existe pas.']); } } else { echo json_encode(['status' => 'error', 'message' => 'Nom de fichier manquant.']); } ?>