[PHP] fgets fails after fopen succeeds -- cleaned up for better digestion.

2005-05-12 Thread Thomas Powell
I removed the "r+", since that not my intended mode. File Handle is 1 after the fopen call. fgets, feof, and fclose fail on $fh. (So does fread, FWIW). The file exists. fopen fails if it is moved. *Code:* 0) { print '' . $line ."\n"; } } ?> *Output:* ./outside/index.txt File Handle:1

Re: [PHP] fgets fails after fopen succeeds

2005-05-10 Thread Thomas Powell
Printing $fh printed a 1. My original file mode was just "r", I changed to "r+" to see if I'd get permissions problems. The file handle seems to be fine. fgets just doesn't like it. The 0 && !feof() was a "commenting out" of the for loop to prevent the fgets from running so that I so print the

[PHP] fgets fails after fopen succeeds

2005-05-10 Thread Thomas Powell
Summary: fopen returns a file handle, yet fgets doesn't want to read it. I've scoured google, php.net , phpfreaks, usenet, etc. It seems to work elsewhere. My setup: Apache 2.0.47 PHP/5.0.4 Windows 2000 The call: make_link_list("index"); (the file exists for fopen(), and actual