Теперь работает внутри директорий тоже.
This commit is contained in:
parent
cf2aea847a
commit
72c502d94a
@ -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/',
|
||||
|
Loading…
Reference in New Issue
Block a user