|
@@ -29,14 +29,14 @@ if ($addr[0]!="modify"){
|
|
render($addr);}
|
|
render($addr);}
|
|
else{
|
|
else{
|
|
$db = json_decode(readDB(), true);
|
|
$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){
|
|
function render($address){
|
|
$db = readDB();
|
|
$db = readDB();
|
|
- $web = json_decode($db, true);
|
|
|
|
|
|
+ echo $db;
|
|
|
|
+ $web = json_decode($db, True);
|
|
$route = implode(",", $address);
|
|
$route = implode(",", $address);
|
|
if (array_key_exists($route, $web)){
|
|
if (array_key_exists($route, $web)){
|
|
echo $web[$route];}
|
|
echo $web[$route];}
|