diff --git a/index.php b/index.php index a0f845d..9f26a51 100644 --- a/index.php +++ b/index.php @@ -5,14 +5,15 @@ $idcko = $_GET['id']; if (!empty($idcko)){ $ipcka = $_SERVER['REMOTE_ADDR']; + + if(!file_exists("data/logs.json")){ + file_put_contents("data/logs.json", "{}"); + } $stranky = json_decode(file_get_contents("data/pageindex.json"), true); $contents = json_decode(file_get_contents("data/contents.json"), true); $logs = json_decode(file_get_contents("data/logs.json"), true); - if(!file_exists("data/logs.json")){ - file_put_contents("data/logs.json", "{}"); - } $alllog = "data/all.log";