我遇到了一个烦人的问题。我在Google App Engine 上有一个应用程序,它通过POST从JS发送一些数据(格式化为JSON字符串)到一个PHP页面。但当我选择超过特定数量的数据时,什么都没有返回。我已经尝试将post_max_size增加到20M,但效果不佳。那么这里可能存在限制吗?还有其他从JS到PHP获取数据的可能性吗?我尝试了以下方式:
function openWindowWithPost(url, name, keys, values) {
var newWindow = window.open(url, name);
if (!newWindow)
return false;
var html = "";
html += "<html><head></head><body><form id='formid' method='post' action='"
+ url + "'>";
if (keys && values && (keys.length == values.length))
for (var i = 0; i < keys.length; i++)
html += "<input type='hidden' name='" + keys[i] + "' value='"
+ values[i] + "'/>";
html += "</form><script type='text/javascript'>document.getElementById(\"formid\").submit()</sc"
+ "ript></body></html>";
newWindow.document.write(html);
return newWindow;
}