note 88842 modified in function.filesize by felipe
| From: | felipe@php.net | Date: | Wed, 11 Feb 2009 22:32:20 +0000 |
| Subject: | note 88842 modified in function.filesize by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-150519@lists.php.net to get a copy of this message | ||
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.
--was--
4 Gb limit, size returned in bytes.
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.
http://php.net/manual/en/function.filesize.php