'2024.1.2', 'updates' => ['202[34].*'] ]; $r = strtr(__DIR__, '\\', '/'); $s = $r . '/core'; $includes = $s . '/includes'; $config = [ 'path' => ['root' => $r, 'classes' => $s . '/classes', 'includes' => $includes, 'modules' => $s . '/modules', 'data' => $r . '/system/data', 'temp' => $r . '/system/data/temp'], 'url' => [], 'dev' => ['mode' => false, 'report_all_warnings' => false] ]; $c = $r . '/customizables/config.php'; if (is_file($c)) { include $c; } unset($r, $s, $c); spl_autoload_register(function($class) use($config) { $map = ['FM' => 'FileRun/Files/FM/FM', 'S' => 'FileRun/Utils/Strings', 'getID3' => 'getid3/getid3']; $p = $config['path']['classes'] . '/' . ($map[$class] ?? strtr($class, '\\', '/')) . '.php'; if (is_file($p)) { require $p; return true; } }); if ($config['dev']['mode']) { require $includes . '/_devel.php'; } $a = $config['path']['data'] . '/autoconfig.php'; if (is_file($a)) { require $a; } require $includes . '/functions.php'; set_error_handler(function($errno, $errstr, $errfile, $errline) use($config) { return in_array($errno, [E_NOTICE, E_USER_NOTICE, E_STRICT, E_DEPRECATED, E_USER_DEPRECATED, E_USER_WARNING]) || ($errno === E_WARNING) && !$config['dev']['report_all_warnings'] && !!array_filter(['Undefined array key', 'Undefined variable', 'Trying to access array offset on value of type', 'Declaration of \Utils\\DB::quote'], function($s) use($errstr) { return str_starts_with($errstr, $s); }); }, E_ALL); if ((isset($_SERVER['argv'][0]) && $_SERVER['argv'][0] === '--cli') || !isset($_SERVER['REQUEST_METHOD']) || PHP_SAPI === 'cli') { $GLOBALS['cliMode'] = true; ........................................................ .................................. ...............