文件
freeshop/includes/init.php
T
2026-08-16 16:52:43 +08:00

18 行
616 B
PHP

<?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';
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);