init
This commit is contained in:
11
functions.php
Normal file
11
functions.php
Normal 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];
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user