--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/data/simple-persist.php Fri Jul 27 19:15:32 2012 +0200
@@ -0,0 +1,14 @@
+<?php
+ header('Content-Type: application/json; charset=utf-8');
+ $file = "dynamic-data.json";
+ if (isset($_GET['reset']) && $_GET['reset']) {
+ $resetfile = "test-data.json";
+ file_put_contents($file, file_get_contents($resetfile));
+ }
+ if ($_POST) {
+ file_put_contents($file, json_encode($_POST));
+ echo json_encode(array("result" => "OK"));
+ } else {
+ echo file_get_contents($file);
+ }
+?>
\ No newline at end of file