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
Code below:
if($_POST['deleting']=='true'){
//grab info from post array $msg = $_POST['deleteThis'];
//when the string was written to the file, this replace occured. it is repeated here
//for consistency
$msg = str_replace( "\n" , "<br>", $msg);
//open msg file for read/write $mfile = fopen("to2do.txt",'r+');
//delete the string $mfile = str_replace($msg, "", $mfile);
/*** error occurs here ***/ fclose($mfile);
}
to2do.txt is a valid file, as I was able to write to it and can view its contents.
Can anyone tell me if I am going about this the wrong way? Thanks for any help.
_________________________________________________________________
Groove on the latest from the hot new rock groups! Get downloads, videos, and more here. http://special.msn.com/entertainment/wiredformusic.armx
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php