From 29c9674b7d6f7b6faa8f2b93eeb6fc78a33b3e8e Mon Sep 17 00:00:00 2001 From: Benjamin Kraft Date: Thu, 13 Jun 2024 20:31:41 +0200 Subject: [PATCH] changed require_once to absolute paths, scripts can now be executed from command line --- public/elotracker/Tracker.php | 4 ++-- public/elotracker/add.php | 8 +++++++- public/elotracker/get.php | 2 +- public/elotracker/index.php | 2 +- public/elotracker/remove.php | 8 +++++++- public/elotracker/update.php | 2 +- public/util/dotenv.php | 2 +- public/util/mysql_connect.php | 2 +- 8 files changed, 21 insertions(+), 9 deletions(-) diff --git a/public/elotracker/Tracker.php b/public/elotracker/Tracker.php index 8b9db75..a20e46d 100644 --- a/public/elotracker/Tracker.php +++ b/public/elotracker/Tracker.php @@ -1,7 +1,7 @@ add($_GET["gameName"], $_GET["tagLine"], $message)){ diff --git a/public/elotracker/get.php b/public/elotracker/get.php index b8adeae..3d11a1a 100644 --- a/public/elotracker/get.php +++ b/public/elotracker/get.php @@ -1,5 +1,5 @@ remove($_GET["gameName"], $_GET["tagLine"], $message)){ diff --git a/public/elotracker/update.php b/public/elotracker/update.php index 36eace0..08e3019 100644 --- a/public/elotracker/update.php +++ b/public/elotracker/update.php @@ -1,6 +1,6 @@ update(); \ No newline at end of file diff --git a/public/util/dotenv.php b/public/util/dotenv.php index 56f3077..55f5850 100644 --- a/public/util/dotenv.php +++ b/public/util/dotenv.php @@ -1,5 +1,5 @@ $value) { +foreach (parse_ini_file(__DIR__."/../../.env") as $key => $value) { $_ENV[$key] = $value; } unset($key, $value); diff --git a/public/util/mysql_connect.php b/public/util/mysql_connect.php index 8e0fb33..db546d1 100644 --- a/public/util/mysql_connect.php +++ b/public/util/mysql_connect.php @@ -1,6 +1,6 @@