问题
So I have a script that creates a script that can then create another script. See below, I have written (how do I escape this) where I'm not sure what to do.
fwrite($file, '
fwrite($file, \'
fwrite($file, (how do i escape this)\' (how do i escape this)\'
\'
');
fclose;
I really hope that makes sense to someone!
回答1:
To escape a backslash add another one:
echo " Escape \\";
来源:https://stackoverflow.com/questions/35879708/how-to-escape-a-backslash-that-is-already-escaping-a-single-quote-in-php