Publisher review:Convert bytes to Mb, Kb, Gb will convert bytes to their highest simplifed extension Convert bytes to Mb, Kb, Gb will convert bytes to their highest simplifed extension
Source Code
function ConvertSize($fs) { if ($fs >= 1073741824) $fs = round($fs / 1073741824 * 100) / 100 . " Gb"; elseif ($fs >= 1048576) $fs = round($fs / 1048576 * 100) / 100 . " Mb"; elseif ($fs >= 1024) $fs = round($fs / 1024 * 100) / 100 . " Kb"; else $fs = $fs . " b"; return $fs; }
Convert bytes to Mb, Kb, Gb is a PHP script for Snippets scripts design by ScriptsForYou.
It runs on following operating system: Windows / Linux / BSD.
Operating system:Windows / Linux / BSD