client/data/simple-persist.php
changeset 248 cdfa6479982b
parent 18 4423bfcd8f9f
equal deleted inserted replaced
247:be916122e21e 248:cdfa6479982b
     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') {