equal
deleted
inserted
replaced
1 <?php |
1 <?php |
2 header('Content-Type: application/json; charset=utf-8'); |
2 header('Content-Type: application/json; charset=utf-8'); |
3 $file = "dynamic-data.json"; |
3 $file = "example-cinema.json"; |
4 if (isset($_GET['reset']) && $_GET['reset']) { |
4 if (isset($_GET['reset']) && $_GET['reset']) { |
5 $resetfile = "test-data.json"; |
5 $resetfile = "test-data.json"; |
6 file_put_contents($file, file_get_contents($resetfile)); |
6 file_put_contents($file, file_get_contents($resetfile)); |
7 } |
7 } |
8 if ($_SERVER['REQUEST_METHOD'] == 'PUT') { |
8 if ($_SERVER['REQUEST_METHOD'] == 'PUT') { |