- 优化二级目录使用

This commit is contained in:
icret
2024-05-07 13:52:54 +08:00
parent 9f512bcf2d
commit 0f89648b76
12 changed files with 178 additions and 110 deletions

View File

@@ -24,7 +24,7 @@
// 设置html为utf8
header('Content-Type:text/html;charset=utf-8');
// 定义根目录
define('APP_ROOT', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')));
define('APP_ROOT', str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__) . '/../')));
// 时区设置 https://www.php.net/manual/zh/timezones.php
require_once APP_ROOT . '/config/config.php';
empty($config['timezone']) ? date_default_timezone_set('Asia/Shanghai') : date_default_timezone_set($config['timezone']);