Convert size in *KB, *MB, *GB ....
Copy this code and paste it in your HTML
function file_size($size)
{
$filesizename = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"); return $size ?
round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $filesizename[$i] : '0 Bytes'; }
Report this snippet
Comments
Subscribe to comments