note 88842 deleted from function.filesize by danbrown
| From: | danbrown@php.net | Date: | Thu, 12 Feb 2009 03:05:01 +0000 |
| Subject: | note 88842 deleted from function.filesize by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-150528@lists.php.net to get a copy of this message | ||
Note Submitter: m dot cellier at loze-technologies dot com
----
4 Gb limit, size returned in bytes.
<?php
function getSize($path)
{
if (($size = filesize($path)) < 0)
{
$size = sprintf("%u", filesize($path));
}
return $size;
}
?>
I'm currently working on a better function for calculating size upper than 4 Gb.