diff --git a/README.md b/README.md index 42ea6ca..c33e160 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,9 @@ | 后端框架 | FastAPI | 0.104+ | | 数据库 | MySQL | 5.7 | | 缓存 | Redis | 7.x | -| 前端 | PHP | 8.0 | +| 前端 | PHP | 8.4 | + +> 前端要求 **PHP 8.4+**:旧版本已停止安全维护、存在已知 CVE,低于 8.4 时前端将拒绝运行并提示升级。 | Web服务器 | Nginx | 1.28+ | ## 文件结构 diff --git a/frontend/config.php b/frontend/config.php index 399f42a..aa864af 100644 --- a/frontend/config.php +++ b/frontend/config.php @@ -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 = [];