Zeradin wrote:I can see that I can turn off the magic quotes or whatever, but will that mess up my code?
Well, that depends. First off, you should definitely disable magic quotes as it's been deprecated (and possibly removed from PHP6, don't recall for sure though). As to whether it will "mess up your code", well that's going to have to be something you test for. If you coded your applications for portability, then no. For example, most of my scripts dealing with SQL queries would work regardless of that directive because of coding like this:
if(get_magic_quotes_gpc()) {
$var1 = mysql_real_escape_string(stripslashes($_POST['var1']));
// etc.
} else {
$var = mysql_real_escape_string($_POST['var1']);
// etc.
}
Again, though, this directive was deprecated and you should drop it in favor of good coding practices instead.
As for your problem, you could either replace line breaks with literal "\n" sequences and replace them when you retrieve the data, or you could use something like [man]SQLite[/man] (or simply move to a SQL database) to handle writing to the files.