Posted By

luman on 08/03/06


Tagged

file size


Versions (?)

Who likes this?

35 people have marked this snippet as a favorite

pagetoscreen
meth
postNuKe
damarev
Jaymoon
pckujawa
NexusRex
blakeb
banjomamo
Ravensky
vali29
hudge
m-alo
JimiJay
SpinZ
wbowers
Steffen82
dyesin
adamsimms
jamesming
elgermano
joaosalless
Bluewall
owais
sultano
kellyrmartin
franverona
galofre
osirisinternet
bobbym245
claudiowebdesign
tspitzr
lfcortes
sbcjr
clac


File Size


 / Published in: PHP
 

  1. function file_size($file){
  2. $filesize = round((((int)$file)/1024)/1024,2);
  3. if($filesize >= 1) $filesize = $filesize."Mb";
  4. else $filesize = round((int)$file/1024,0)."Kb";
  5.  
  6. return $filesize;
  7. }

Report this snippet  

You need to login to post a comment.