From df18fcc2f851010012a3c3b44846a78519a4c7e1 Mon Sep 17 00:00:00 2001 From: Gyurix Date: Wed, 27 Nov 2024 12:25:10 +0100 Subject: [PATCH] json extension was added --- functions.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index e5fd1da..e8637a3 100644 --- a/functions.php +++ b/functions.php @@ -289,7 +289,7 @@ function set_output($op,$output) { redis_set($op,$output); } else { - file_put_contents($SHARED_DIR."/input/".$op,$output); + file_put_contents($SHARED_DIR."/input/".$op.".json",$output); } return true; @@ -299,8 +299,9 @@ function check_files($dir,$key) { global $SHARED_DIR; - if (file_exists($SHARED_DIR."/{$dir}/".$key)) { - $arr[$key] = file_get_contents($SHARED_DIR."/{$dir}/".$key); + $input_file = $SHARED_DIR."/{$dir}/".$key.".json"; + if (file_exists($input_file)) { + $arr[$key] = file_get_contents($input_file); } else $arr = "";