// +---------------------------------------------------------------------- // [ 应用入口文件 ] // 定义应用目录 define('APP_PATH', __DIR__ . '/../application/'); // 无路由时可选跳转到后台入口(见 application/extra/public_entry.php) $__pef = APP_PATH . 'extra/public_entry.php'; if (is_file($__pef)) { $__pe = include $__pef; if (is_array($__pe) && !empty($__pe['index_bare_redirect_to_admin'])) { $__adm = isset($__pe['admin_bootstrap']) ? basename((string)$__pe['admin_bootstrap']) : ''; if ($__adm !== '' && is_file(__DIR__ . '/' . $__adm)) { $__pi = isset($_SERVER['PATH_INFO']) ? trim((string)$_SERVER['PATH_INFO'], '/') : ''; $__s = isset($_GET['s']) ? trim((string)$_GET['s'], '/') : ''; if ($__pi === '' && $__s === '' && (!isset($_GET['to']) || (string)$_GET['to'] !== 'frontend')) { $__dir = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'] ?? '/')); if ($__dir === '/' || $__dir === '\\' || $__dir === '.') { $__dir = ''; } $__loc = rtrim($__dir, '/') . '/' . $__adm; header('Location: ' . $__loc, true, 302); exit; } } } } unset($__pef, $__pe, $__adm, $__pi, $__s, $__dir, $__loc); // 判断是否安装 if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) { header("location:./install.php"); exit; } // 加载框架引导文件 require __DIR__ . '/../thinkphp/start.php';