Files
2026-08-14 10:55:06 +08:00

27 lines
801 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
session_start();
require_once __DIR__ . '/_install_redirect.php';
define('IN_APP', true);
require_once __DIR__ . '/../config.php';
require_once __DIR__ . '/db.php';
require_once __DIR__ . '/functions.php';
// 自动加载 includes/ 下的类文件(类名需与文件名一致,如 Logger -> Logger.php
spl_autoload_register(function ($class) {
$file = __DIR__ . '/' . $class . '.php';
if (is_file($file)) {
require $file;
}
});
require_once __DIR__ . '/Lang.php';
// 初始化多语言系统
Lang::setDir(__DIR__ . '/../assets/lang');
Lang::detectLocale();
// 初始化日志系统
Logger::init(__DIR__ . '/../storage/logs', true, defined('DEBUG') && DEBUG ? Logger::DEBUG : Logger::INFO);
// 初始化缓存系统
Cache::init(__DIR__ . '/../storage/cache', true);