我使用ajax jquery发送数据到php, 作为数据我发送一个url作为字符串从包含特殊字符,即“&” 所以我没有满网址即我检索到的数据,直到'&'只有rest id被忽略且不显示。在php中检索特殊字符通过ajax发送
下面是我对Ajax和PHP代码:
dummytest.php
$temp=$_POST['address'];
echo $temp;
的test.html (Ajax来发送数据)
var send="http//192..../oracle/master.php?result=2&table=1"
$.ajax({
type: "POST",
url: "dummytest.php",
dataType: "text",
data: send,
success: onSuccess,
error: onError
});
我发送数据 “发送”,即一个URL字符串作为数据 但我只在我的PHP我接受它,直到“&”,即
http//192..../oracle/master.php?result=2
任何人都可以告诉我如何获取我的完整数据/网址?
尝试使用'%26'来代替'&' –