A
Anonymous
Guest
What is OS you use?louisb said:I am having a small problem while updating a text file, using fputs();
Any quotes or double quotes within the $main variable (which is written to the file) have a preceding backslash added to them.
The $main variable has been passed from a form textarea.
Does any have any idea why this is or what I have done wrong.
if (isset($main)){
if($mainfile=fopen("../../content/main.txt","w")){
fputs($mainfile,$main);
fclose($mainfile);
}else{
echo("Could not open file for writing!");
}
}
Thanks,
LouisB
It's very important!