From 3118222734aa76ffa71f8e7b6c8b57fa420366d6 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 14 Mar 2021 16:58:30 +0800 Subject: [PATCH] get disk space size --- common.php | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/common.php b/common.php index 2d815fe..55e2578 100644 --- a/common.php +++ b/common.php @@ -859,7 +859,7 @@ function size_format($byte) while (abs($byte) >= 1024) { $byte = $byte / 1024; $i++; - if ($i == 3) break; + if ($i == 4) break; } $units = array('B', 'KB', 'MB', 'GB', 'TB'); $ret = round($byte, 2); @@ -1291,18 +1291,25 @@ function EnvOpt($needUpdate = 0)
Driver | -' . getConfig('Driver', $disktag); + |
Driver | +' . getConfig('Driver', $disktag); if ($diskok) $frame .= ' ' . getconstStr('ChangeDrivetype') . ''; $frame .= ' | -
diskSpace | ' . $disk_tmp->getDiskSpace() . ' | +
' . $ext_env . ' | ' . getConfig($ext_env, $disktag) . ' |
' . $ext_env . ' | +' . getConfig($ext_env, $disktag) . ' | +