From 84f52e05b3fa566f7d9d314ed47f4e1d2d32cf9b Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Sat, 12 Jul 2025 13:32:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=A3=81=E7=9B=98?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=83=85=E5=86=B5=E6=98=BE=E7=A4=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在首页添加磁盘空间使用情况的进度条显示,包括总容量和已用空间的统计 --- index.php | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 51dd733..627d8ba 100644 --- a/index.php +++ b/index.php @@ -96,7 +96,44 @@ $announcement = $announcementResult && $announcementResult->num_rows > 0 ? $anno -
+ + +
+ = 1073741824) { + return round($bytes / 1073741824, 2) . ' GB'; + } elseif ($bytes >= 1048576) { + return round($bytes / 1048576, 2) . ' MB'; + } elseif ($bytes >= 1024) { + return round($bytes / 1024, 2) . ' KB'; + } else { + return $bytes . ' B'; + } + } + ?> +
+ 磁盘使用情况 + / +
+
+
%
+