refactor: 将硬编码文件路径改为相对路径
修改url.txt和auth.json的路径从绝对路径改为相对路径,提高代码的可移植性和部署灵活性
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user