From cda9c66306829e3b7035750e756a6ac7a3a4887e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1ts=20Levente?= Date: Mon, 25 Jan 2021 08:26:02 +0100 Subject: [PATCH] =?UTF-8?q?DEBUG=20kapcsol=C3=B3=20a=20utils-ba?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- interface.php | 7 ------- utils.php | 11 +++++++++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/interface.php b/interface.php index eb1d803..9cb584c 100644 --- a/interface.php +++ b/interface.php @@ -2,13 +2,6 @@ include_once "utils.php"; -// hibakeresés -if (DEBUG_MODE) { - ini_set("display_errors", "On"); -} else { - ini_set("display_errors", "Off"); -} - // feltöltési limit 10 percen belül define("UPLOAD_LIMIT_10MIN", 10); diff --git a/utils.php b/utils.php index ee5cf37..23f6a60 100644 --- a/utils.php +++ b/utils.php @@ -2,6 +2,17 @@ include_once "globals.php"; +// hibakeresés +if (DEBUG_MODE) { + ini_set('display_errors', '1'); + ini_set('display_startup_errors', '1'); + error_reporting(E_ALL); +} else { + ini_set('display_errors', '0'); + ini_set('display_startup_errors', '0'); + error_reporting(0); // Turn off all error reporting +} + // olyan szöveget ad vissza, amibe csak angol ABC betűi és számok szerepelnek (KL) function only_alpha_numeric($input) {