note 36886 added to function.filesize

From: Date: Sun, 26 Oct 2003 09:02:54 +0000
Subject: note 36886 added to function.filesize
Groups: php.notes 
Request: Send a blank email to php-notes+get-59300@lists.php.net to get a copy of this message
return the size of $file in human readable format (use only B K M G) function fsize($file){ $type = Array ('B', 'K', 'M', 'G'); $filesize = filesize ($file); for ($i = 0; $filesize >= 1024 && $i < 4; $i++) $filesize /= 1024; return round($filesize,2).$type[$i]; } ---- Manual Page -- http://www.php.net/manual/en/function.filesize.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36886 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36886&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36886&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59300) next »