I have a piece of code that opens a file into a text area for editing, but when I use fwrite() to save the text file and overwrite the old it palces escape characters every where therefore the file doesn't work anymore
How can I rectify this problem and stop fwrite() from inserting the escape char.
Here's my code.
$filename = "$page";
$fh = fopen($filename, 'w') or die('Could not open file!');
fwrite($fh, $body_text) or die( 'Could not write to file' );
fclose($fh);
ideas...I'm guessing maybe I should use something different then a w for permissions... I need to make changes to the file then overwrite it not add too it...
Thanks