ID: 3895
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: Other
Operating System: linux
PHP Version: 3.0.14
New Comment:
you have to use "or" instead of "||" here
the || resulted in 1 for both assigments
and just by chance the first fopen also
returned resource id 1, while the second
returned 2, so first handle works but
second fails as resource id 1 is already closed
Previous Comments:
------------------------------------------------------------------------
[2000-03-22 09:31:56] [EMAIL PROTECTED]
using the following lines of code:
$fd=fopen("$file1","r") || die ("Internal Error\n");
$content=fread($fd,filesize($file1));
echo "$content</br>";
fclose("$fd");
$fh=fopen("$file2","r") || die ("Internal Error\n");
11 $content=fread($fh,filesize($file2));
echo "$content</br>";
13 fclose($fh);
results in:
Text from file1
Warning: Unable to find file identifier 1 in
/usr/local/htdocs/test.php3 on line 11
Warning: Unable to find file identifier 1 in
/usr/local/htdocs/test.php3 on line 13
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=3895&edit=1