note 61607 added to function.file-exists
| From: | hiro at arkusa dot com | Date: | Tue, 07 Feb 2006 21:23:18 +0000 |
| Subject: | note 61607 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-103233@lists.php.net to get a copy of this message | ||
As of php 5.0.4, many (if not all) php file manipulation functions fail if a file's size is no
smaller than 2GB (i.e. 2^31) on the x86 platforms. Even file_exists() fails (always returns FALSE).
This puzzled me when I was writing a video file manipulation application.
A simple alternative is like:
function file_exists_2gb($filename) {
system("test -f $filename", $rval);
return ($rval == 0);
}
----
Server IP: 216.194.113.175
Probable Submitter: 12.47.58.140
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61607
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61607&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61607&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61607&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61607&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61607&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61607&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61607&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61607&report=yes
Search -- http://master.php.net/manage/user-notes.php