refactor: 将硬编码文件路径改为相对路径

修改url.txt和auth.json的路径从绝对路径改为相对路径,提高代码的可移植性和部署灵活性
This commit is contained in:
2025-11-25 17:20:33 +08:00
parent 94dd3a4e05
commit 620e7ce21c
+2 -2
View File
@@ -11,8 +11,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
}
// 定义文件路径
$urlFilePath = 'c:\\Users\\吴展鹏\\wangpu_auth\\url.txt';
$authFilePath = 'c:\\Users\\吴展鹏\\wangpu_auth\\auth.json';
$urlFilePath = 'url.txt';
$authFilePath = 'auth.json';
// 读取并返回auth.json文件的内容
if (file_exists($authFilePath)) {