From 2f3dc9ef797f20f915be2f7c25e2136bd192c89d Mon Sep 17 00:00:00 2001 From: James Date: Tue, 21 Jan 2025 12:46:26 +0800 Subject: [PATCH] version 1.0 --- server/bench.html | 263 ++++++++++++++++++++++++++++++++++++++++++++++ server/index.php | 2 +- 2 files changed, 264 insertions(+), 1 deletion(-) diff --git a/server/bench.html b/server/bench.html index 97083ad..bee3fe2 100644 --- a/server/bench.html +++ b/server/bench.html @@ -229,3 +229,266 @@ + + + + + + 测试结果页面 + + +
+ 正在加载文件 +
+
+ + + + + + + + + + diff --git a/server/index.php b/server/index.php index c521dfc..2d98810 100644 --- a/server/index.php +++ b/server/index.php @@ -48,7 +48,7 @@ if (!is_dir($directory) && !mkdir($directory, 0755, true)) { $fileName = "NL" . time() . "-" . strtoupper(substr(md5($uploadData), 0, 6)) . ".txt"; // 构造文件 URL -$baseUrl = getHttpType() . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']); +$baseUrl = rtrim(getHttpType() . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']), '/'); // 去掉末尾多余的斜杠 $filePath = $directory . $fileName; // 保存文件