|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-09-09 09:34 UTC] sterling@php.net
[2001-09-09 14:16 UTC] mark at peak-comm dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 00:00:02 2025 UTC |
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 = "http://host.domain.com/" . $year . "/" . $months $month] . "/" . $day . "/" . "$query[$ws]" . ".txt"; $fd = @fopen($filename,"r"); if (!$fd) { print "Unable to open file: $filename" . "<br>"; $ws++; continue; } 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.