RE: [PHP] Deleting a String from a file.

From: Date: Fri, 21 Nov 2003 21:51:11 +0000
Subject: RE: [PHP] Deleting a String from a file.
Groups: php.general 
Request: Send a blank email to php-general+get-170627@lists.php.net to get a copy of this message
Cameron Badgley <mailto:autocautiondoor@hotmail.com> on Friday, November 21, 2003 1:42 PM said: > I have written the following code but receive the error: > Warning: fclose(): supplied argument is not a valid File-Handle > resource in /u3/7/cirop27/public_html/todo/to2doDEL.php on line 63 [snip] > //delete the string > $mfile = str_replace($msg, "", $mfile); I think it's because you are now assigning the output of str_replace() to $mfile which at that points makes $mfile stop being a file handle and turns it into a string, which is not a file handle. This is just a guess, I haven't worked with files much. HTH. Chris. -- Don't like reformatting your Outlook replies? Now there's relief! http://home.in.tum.de/~jain/software/outlook-quotefix/

« previous php.general (#170627) next »