I use file_get_contents()
& file_put_contents()
to load and save a .css
file. After saving the loaded file the file_put_content
Stripslashes is probably what you're looking for. Certain PHP installations will automagically escape strings for you by adding slashes. This should reverse that.
Check out Magic Quotes
Most likely you have Magic Quotes turned on.
So just turn it off in php.ini
and restart PHP.
To strip the slashes:
file_put_contents($file, stripslashes($_POST['editor']));