JavaScript-POST最大长度或JS对象最大长度?

我陷入一个烦人的问题.我在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;
}

解决方法:

您可以检查服务器配置文件PHP.ini并检查最大帖子大小max_post_size.如果认的发布字符串长度不够,则可以增加其长度.

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...