note 105902 added to function.filesize
| From: | m3gadeth at gmail dot com | Date: | Sat, 24 Sep 2011 12:30:12 +0000 |
| Subject: | note 105902 added to function.filesize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183400@lists.php.net to get a copy of this message | ||
Regarding the perl_filesize function posted below, as a solution to files >2GB problem:
The function won't work with %d, %u will work up to 4GB, but %s works.
here's the rewritten function
<?php
function perl_filesize($filename)
{
return exec("
perl -e 'printf \"%s\n\",(stat(shift))[7];' ".$filename."
");
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 93.143.250.12
----
Manual Page -- http://www.php.net/manual/en/function.filesize.php
Edit -- https://master.php.net/note/edit/105902
Del: integrated -- https://master.php.net/note/delete/105902/integrated
Del: useless -- https://master.php.net/note/delete/105902/useless
Del: bad code -- https://master.php.net/note/delete/105902/bad+code
Del: spam -- https://master.php.net/note/delete/105902/spam
Del: non-english -- https://master.php.net/note/delete/105902/non-english
Del: in docs -- https://master.php.net/note/delete/105902/in+docs
Del: other reasons-- https://master.php.net/note/delete/105902
Reject -- https://master.php.net/note/reject/105902
Search -- https://master.php.net/manage/user-notes.php