403 FORBIDDEN ajax调用脚本 [英] 403 FORBIDDEN ajax calling script
本文介绍了403 FORBIDDEN ajax调用脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
JavaScript URL编码
Possible Duplicate:
JavaScript URL encode
一些运行良好的脚本开始给我这个错误.
some scripts working fine started to give me this error.
这可能是由于传递的字符串中有一些特殊字符所致.
It is probably due to some special chars inside the string passed.
Ajax称呼它为
.../ControllerAjaxSpecifiche.php?Material=100%%20poliester&product=Maglia (trikot)
这样说403禁止错误
删除%和()起作用
.../ControllerAjaxSpecifiche.php?Material=100%20poliester&product=Maglia trikot
我该如何解决这个问题?
How I can solve this problem?
我尝试将这些变量作为post传递,但没有成功,并且我仍然遇到同样的问题.
I tried passing those variables as post, buit it did not works, and I continue having same problem.
推荐答案
在传递值之前,尝试urlencode()
(php)或encodeURI() encodeURIComponent()
(js).这样可以避免任何有害字符
Try urlencode()
(php) or encodeURI() encodeURIComponent()
(js) before passing the values. This should escape any harmful characters
这篇关于403 FORBIDDEN ajax调用脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文