I use file_get_contents()
& file_put_contents()
to load and save a .css
file. After saving the loaded file the file_put_contents()
function will escape the quotes, how can this be prevented.
$file = 'pathto/base.css';
$ta = $file_get_contents($file);// load
<textarea name="editor"><?php echo $ta;?></textarea>
// press submit button here
file_put_contents($file, $_POST['editor']);// save
// new css code will be something like this
.row:after{
content:/"/";// not what we need
}