|
@@ -29,14 +29,14 @@ if ($addr[0]!="modify"){
|
|
|
render($addr);}
|
|
|
else{
|
|
|
$db = json_decode(readDB(), true);
|
|
|
- print_r($db);
|
|
|
- //array_push($db, ["lol1", "test1"]);
|
|
|
- echo json_encode($db);
|
|
|
+ $db["lol2"] = "test2";
|
|
|
+ writeDB(json_encode($db));
|
|
|
}
|
|
|
|
|
|
function render($address){
|
|
|
$db = readDB();
|
|
|
- $web = json_decode($db, true);
|
|
|
+ echo $db;
|
|
|
+ $web = json_decode($db, True);
|
|
|
$route = implode(",", $address);
|
|
|
if (array_key_exists($route, $web)){
|
|
|
echo $web[$route];}
|