07-12-2011, 07:57 PM
|
#2 (permalink)
|
|
The Addict
Join Date: Aug 2008
Posts: 336
Thanks: 8
|
stripslashes is only for back slashes only to prevent quoted strings. But there is also other text replacement functions out there. my favorites are strtr and str_replace Plus in those functions you still need to save the results in a variable or they are not going to stay.
I would do it like this:
PHP Code:
//now lets pull out the tmp data (old data) $ctoaddtmp = file_get_contents("../DOCS/originalsLISTtmp.txt"); //now input the old data to the file $ctoadd3 = str_replace(array('/', '\\'), '', $ctoaddtmp . $displaytext); $myoldfile = "../DOCS/originalsLIST.txt"; file_put_contents ($myoldfile, $ctoadd3);
|
|
|
|