Question:
php escaping double quotes is not working?
jzimmerman56301
2011-01-07 11:13:45 UTC
So i have an odd problem, maybe its just a config issue.. I installed an xampp lite server onto my flash drive and downloaded everything from my site on the net to the drive.. The problem is all of the \" (php escape for double quotes) in the code are not working on the local site, but are working online? is there a certain configuration change i need to make?
Three answers:
truthfinder
2011-01-07 17:29:23 UTC
If the escaping is hard-coded, then no, no configuration should be needed.



So, following line should work in any case:



echo "this \" is working";



However, if the escaping is part of IO, then you'll need to check the magic_quotes_gpc setting in php.ini



You can also check using this PHP function: get_magic_quotes_gpc(), if it returns 1 then the setting is on, otherwise off. Check with this function both in server and local site and set the same setting for local site.



Remember: most possible magic_quotes_gpc is on in your server for security reasons.
arz
2011-01-09 11:26:45 UTC
I'm not aware of any such problem.



Check your local PHP installation, try reinstalling it. It might do the trick :)
anonymous
2011-01-07 19:42:53 UTC
No. should produce



these " are double quotes


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...