[fix]公共函数字节转换bug修复

pull/455/head
bran 2023-08-28 08:55:53 +08:00
parent 9bbd11e4bc
commit 6b4cdff2e0
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ if (!function_exists('format_bytes')) {
function format_bytes($size, $delimiter = '', $precision = 2)
{
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');
for ($i = 0; $size >= 1024 && $i < 6; $i++) {
for ($i = 0; $size >= 1024 && $i < 5; $i++) {
$size /= 1024;
}
return round($size, $precision) . $delimiter . $units[$i];