/ Published in: PHP
This function converts file size in bytes to the larger units. You can add bigger values like exa-, zetta-, yotta- bytes.
Expand |
Embed | Plain Text
function calculateSize($size, $sep = ' ') { $unit = null; { if ($size > 1024) { $size = $size / 1024; } else { $unit = $units[$i]; break; } } }
Comments
Subscribe to comments
You need to login to post a comment.

Good job, thank you.