Guest User

Untitled

a guest
Dec 14th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. function bytesToSize1024($bytes, $precision = 2) {
  2. $unit = array('B','KB','MB','GB','TB','PB','EB');
  3.  
  4. return @round($bytes / pow(1024, ($i = floor(log($bytes, 1024)))), $precision).' '.$unit[$i];
  5. }
Add Comment
Please, Sign In to add comment