note 80290 added to function.filesize

From: Date: Tue, 08 Jan 2008 14:10:11 +0000
Subject: note 80290 added to function.filesize
Groups: php.notes 
Request: Send a blank email to php-notes+get-134946@lists.php.net to get a copy of this message
This script checks whether the file is large enough for the next unit and calculates them. Example: 29249 bytes => 28.56 KB 10083695 bytes => 9.62 MB function get_size($size) { $bytes = array('B','KB','MB','GB','TB'); foreach($bytes as $val) { if($size > 1024){ $size = $size / 1024; }else{ break; } } return round($size, 2)." ".$val; } ---- Server IP: 217.160.72.57 Probable Submitter: 87.123.99.156 ---- Manual Page -- http://www.php.net/manual/en/function.filesize.php Edit -- https://master.php.net/note/edit/80290 Del: integrated -- https://master.php.net/note/delete/80290/integrated Del: useless -- https://master.php.net/note/delete/80290/useless Del: bad code -- https://master.php.net/note/delete/80290/bad+code Del: spam -- https://master.php.net/note/delete/80290/spam Del: non-english -- https://master.php.net/note/delete/80290/non-english Del: in docs -- https://master.php.net/note/delete/80290/in+docs Del: other reasons-- https://master.php.net/note/delete/80290 Reject -- https://master.php.net/note/reject/80290 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#134946) next »