Re: Php warning message

From: Date: Thu, 21 Feb 2008 16:49:28 +0000
Subject: Re: Php warning message
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269796@lists.php.net to get a copy of this message
On Wed, February 20, 2008 3:29 pm, Yuval Schwartz wrote: > Hello and thank you, > > Another question, I get a message: > > *Warning*: feof(): supplied argument is not a valid stream resource in > * > /home/content/t/h/e/theyuv/html/MessageBoard.php* on line *52* > ** > And I've tried troubleshooting for a while; I'm pretty sure I'm > opening the > file handle correctly and everything but I can't get feof or similar > functions like fgets to work. > > Here is my code if you're interested (it's so that I color every 2nd > line in > the text): > > *$boardFile = "MessageBoard.txt"; > $boardFileHandle = fopen($boardFile,"r"); if (!$boardFileHandle){ die("Unable to open $boardFile\n"); } The fact that you are seeing zero error messages indicates that you almost for sure aren't checking the right places to find error messages... Figure out what's in your php.ini and get it to use E_ALL and send the errors to a log or something. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So?

« previous php.general (#269796) next »