I need to modify free script. THis is how script showing file size. $size = urlfilesize($extern_file); $a = array("B", "KB", "MB", "GB", "TB", "PB"); $pos = 0; while ($size >= 1024) { $size /= 1024; $pos++; } $size = round($size,2)." ".$a[$pos]; PHP: When I upload file which is e.g.5kb it shows 5kb, when I upload 5mb, it shows 5mb, I would like to make it to show 5000kb
$size = urlfilesize($extern_file); //assuming this is returned in bytes... $size /= pow(2,10).' KB'; PHP: