From 8f58b38a1790f94ec02cb1968daea95d59ed2ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Fri, 9 Jun 2023 21:54:01 +0200 Subject: [PATCH] fix2 --- index.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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";