ID: 5708
Updated by: sterling
Old Status: Open
Status: Bogus
Bug Type: Misbehaving function
Operating System: Linux
PHP Version: 3.0.16
New Comment:

I highly doubt this is truly a PHP bug, if you can find a
test case that can always be reproduced, please open a new
bug report.

Previous Comments:

[2000-07-20 21:46:32] [EMAIL PROTECTED]

I'm opening up a series of files with fopen, and reading them into an array using 
fgets.  After reading the first couple files in succesfully, fopen falsly reports that 
further files do not exist.

Each of the failures echoes the $filename, if I take that URL and pull it up in a web 
browser, it retrieves the file.

This is all in a loop that generates the filename variables.

for (....... {

  $filename = ""; . $year . "/" . $months $month] . "/" . $day . 
"/" . "$query[$ws]" . ".txt";
  $fd = @fopen($filename,"r"); 
  if (!$fd) { 
    print "Unable to open file: $filename" . "<br>";
  while (!feof($fd)) {
    $data[] = fgets($fd, 4096);
  fclose ($fd);

....... } 

So what I end up with is proper information for the first file or two, the rest of the 
files fail regaurdless of whether they exist or not.


Edit this bug report at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to