From 8d33f7391e65c666f68b079df46c45b2e130c5d2 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sun, 15 Feb 2026 08:30:51 +0100 Subject: [PATCH] commented the DIRECTORY_SEPARATOR stuff --- application/libraries/Paths.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/libraries/Paths.php b/application/libraries/Paths.php index b992ec3b6..24dedda76 100644 --- a/application/libraries/Paths.php +++ b/application/libraries/Paths.php @@ -41,9 +41,12 @@ class Paths $err_exceptions = [ '/assets/json/datatables_languages/en-US.json', ]; + + $fullpath = $_SERVER['DOCUMENT_ROOT'] . $filepath; - // Use DIRECTORY_SEPARATOR for cross-platform compatibility (aka Windows may needs special handling) - $fullpath = rtrim($_SERVER['DOCUMENT_ROOT'], '/\\') . str_replace('/', DIRECTORY_SEPARATOR, $filepath); + // We comment out this line because latest teste at LA8AJA's XAMPP setup showed that it works even without it + // So we will keep it simple and just use the $filepath as is, since it seems to work fine on both Linux and Windows setups + // $fullpath = rtrim($_SERVER['DOCUMENT_ROOT'], '/\\') . str_replace('/', DIRECTORY_SEPARATOR, $filepath); if (file_exists($fullpath)) { return base_url($filepath) . '?v=' . filemtime($fullpath);