CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 file upload > show FileSize in Kb not in bytes

Print topic Send  topic

Author Message
viktor
Posted: 11/02/2004, 7:09 AM

Is there any "quick and dirty" way to show / output file size of the uploaded file in Kb instead of usual bytes.

Thanks!
viktor
Posted: 11/07/2004, 10:55 PM

Anybody would know the answer how to show bytes in Kb or Mb in FileUpload module?

Thanks in advance
Walter Kempees
Posted: 11/15/2004, 3:42 PM

PhP:
  
function fsize($size) {  
  
$a = array("b", "Kb", "Mb", "Gb", "Tb", "Pb");  
  
while ($size >= 1024) {  
  
$size /= 1024;  
  
$pos++;  
  
}  
  
return round($size,2)." ".$a[$pos];  
  
}  
  
"viktor" <viktor@forum.codecharge> schreef in bericht
news:54187a319d4fcc@news.codecharge.com...
> Is there any "quick and dirty" way to show / output file size of the
> uploaded
> file in Kb instead of usual bytes.
>
> Thanks!
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.