前端最低 PHP 版本提升至 8.4(规避旧版本已知 CVE)

1. frontend/config.php 增加 PHP 版本校验:低于 8.4 拒绝运行并提示升级(upgrade.php 同步生效)
2. README 技术栈与版本要求更新为 PHP 8.4+
3. 已扫描全部前端 PHP 代码:无 8.1~8.4 弃用/移除用法(隐式可空参数、strftime、utf8_encode、get_class() 无参等)
This commit is contained in:
canglan committed 2026-10-22 13:10:07 +08:00
1 parent d0cdb5b928
commit 71c3263335
2 files changed
+9 -1

No files matched your search

+6
View File
@@ -10,6 +10,12 @@
* 版权所有 © Sea Network Technology Studio
*/
// PHP 版本要求:8.4+(旧版本已停止安全维护,存在已知漏洞)
if (PHP_VERSION_ID < 80400) {
http_response_code(500);
die('系统要求 PHP 8.4 或更高版本(当前版本:' . PHP_VERSION . ')。请先升级服务器 PHP 版本以规避已知安全漏洞。');
}
// 读取.env文件
$envFile = __DIR__ . '/.env';
$config = [];