This commit is contained in:
2025-05-06 17:52:49 +08:00
6 changed files with 403 additions and 1 deletions

View File

@ -75,7 +75,17 @@ function check_dir_write(string $dir = '') : bool
$route = root_path() . '/' . $dir;
return is_writable($route);
}
function is_https()
{
if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
return true;
} elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
return true;
} elseif (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') {
return true;
}
return false;
}
/**
* 多级线性结构排序