PHP Code

Friendly file size for a file using php code

Hi friends, In this post i would like to explain about get the friendly file size using simple php code. PHP Code following code is very simple to get the friendly file size format using php code. function frndlyfilesize($filesize){ if(is_numeric($filesize)){ $decr = 1024; $step = 0; $prefix = array(’Byte’,’KB’,’MB’,’GB’,’TB’,’PB’); while(($fileName / $decr) > 0.9){ $filesize …

Continue Reading