开发者

jQuery $.post string escape problem

I am posting data to a php file via jQuery's $.post method, but for some reason the string comes out escaped on the other side, like so,

Sent: company_name="company"

Received: company_na开发者_运维知识库me=\"company\"

Any idea what could be the cause?

Thanx in advance!


sounds like you have magic_quotes enabled on your server - and, as you see, you should realy disable that to avoid confusing stuff like that (see: why not to use magic quotes). (also, this "feature" will be deleted in the future, so you shouldnt rely on that)


You most likely have ugly magic quotes turned on. You should disable them just in case. See how to disable them here:

http://www.php.net/manual/en/security.magicquotes.disabling.php


You probably have magic_quotes_gpc on. Turn them off, or, if you can't, use stripslashes to remove them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜