XMLHTTP AJAX post 请求中的参数在翻译中被更改
Parameter in XMLHTTP AJAX post request is being altered in translation
只是一个快速的问题,我希望通过 XMLHttpRequest 方法发送一个字符串,但在传输过程中遇到数据转换不正确的问题。这是我要发送的内容:
xmlhttp.open("POST","create_table.php?", true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("steamID="+steamID);
steamID
在进入 .send()
方法时看起来像这样: 76561198000759657.
当它返回到我的 php 页面时,它看起来像这样:76561198000759660.
对于不同的 steamID,无论它总是几乎总是在最后四舍五入。知道如何防止这种情况吗?
非常感谢任何帮助。
原来我需要在引号中调用我的 php 函数...
所以:
$().ready(function() {
retrieveInventory(<?php echo $_GET['steamID']; ?>, 1);
});
需要:
$().ready(function() {
retrieveInventory('<?php echo $_GET['steamID']; ?>', 1);
});
只是一个快速的问题,我希望通过 XMLHttpRequest 方法发送一个字符串,但在传输过程中遇到数据转换不正确的问题。这是我要发送的内容:
xmlhttp.open("POST","create_table.php?", true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("steamID="+steamID);
steamID
在进入 .send()
方法时看起来像这样: 76561198000759657.
当它返回到我的 php 页面时,它看起来像这样:76561198000759660.
对于不同的 steamID,无论它总是几乎总是在最后四舍五入。知道如何防止这种情况吗?
非常感谢任何帮助。
原来我需要在引号中调用我的 php 函数...
所以:
$().ready(function() {
retrieveInventory(<?php echo $_GET['steamID']; ?>, 1);
});
需要:
$().ready(function() {
retrieveInventory('<?php echo $_GET['steamID']; ?>', 1);
});