note 37505 added to function.fopen
| From: | BillFletcher at rn2 dot php dot net | Date: | Tue, 18 Nov 2003 03:33:21 +0000 |
| Subject: | note 37505 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60550@lists.php.net to get a copy of this message | ||
I had the same problem mentioned by Tim Fountain below: trying to open a file larger than 2 GB to
read it throws the error "Value too large for defined data type" . (This error is explain
in the online manual under filesize(), but no workaround for OPENING files is given.)
After lots of Googling (mainly to unanswered forum questions) I found a workaround on a Perl forum:
open a pipe to "cat filename":
$fh = popen("cat $filename", "r");
Hope this saves someone some of the grief I've just gone through!
Bill
----
Manual Page -- http://www.php.net/manual/en/function.fopen.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37505
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37505&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37505&report=yes
Search -- http://master.php.net/manage/user-notes.php