This commit is contained in:
bubasik
2019-02-04 11:00:54 +03:00
parent 4d92b6b396
commit d0cabc8d87
21 changed files with 452 additions and 1 deletions

11
functions.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
function humansize($bytes, $devider) {
$type = array('', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y');
$i = 0;
while ($bytes >= $devider) {
$bytes /= $devider;
$i++;
}
return round($bytes, 2) . ' ' . $type[$i];
}
?>