mirror of https://gitee.com/karson/fastadmin.git
Compare commits
No commits in common. "6f35aff2eb766d925eb8e2ec61c1165102b5f371" and "9bbd11e4bcdbacfac2a5827cc89be2222c2eec79" have entirely different histories.
6f35aff2eb
...
9bbd11e4bc
|
|
@ -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 < 5; $i++) {
|
||||
for ($i = 0; $size >= 1024 && $i < 6; $i++) {
|
||||
$size /= 1024;
|
||||
}
|
||||
return round($size, $precision) . $delimiter . $units[$i];
|
||||
|
|
|
|||
Loading…
Reference in New Issue