diff --git a/_incl_data/autoload.php b/_incl_data/autoload.php index 55f7e9ac..9a639dfb 100644 --- a/_incl_data/autoload.php +++ b/_incl_data/autoload.php @@ -9,7 +9,7 @@ require_once 'mysql_override.php'; require_once 'class/Insallah/Config.php'; spl_autoload_register(function (string $className) { - $rootdir = getcwd() . '/_incl_data'; + $rootdir = $_SERVER['DOCUMENT_ROOT'] . '/_incl_data'; # 1 with namespaces # 2 without $fileName = [ @@ -25,7 +25,7 @@ spl_autoload_register(function (string $className) { }); spl_autoload_register(function (string $classname) { - $rootdir = getcwd() . '/_incl_data'; + $rootdir = $_SERVER['DOCUMENT_ROOT'] . '/_incl_data'; $classMap = [ 'NewCombats' => $rootdir . '/class/', 'Insallah' => $rootdir . '/class/Insallah/',