栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

PHP不使用Ajax在数据库中插入超过91行的数据

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

PHP不使用Ajax在数据库中插入超过91行的数据

我注意到在您的HTML中,索引从事件92跳到事件146。

同样,隐藏字段的

PRASANNA B
发生次数为92,但单选按钮的发生次数为145。

看起来当您创建此表单时,索引策略出了点问题!这可能可以解释为什么在将第92行加载到数据库时一切都开始出错

</tr><tr><td>PRASANNA B <input type="hidden" name="student[92]" value="PRASANNA B"><input type="hidden" name="Reg[92]" value="13KQC31172"><input type="hidden" name="schoolid[92]" value="FT001"><input type="hidden" name="section[92]" value="A"><input type="hidden" name="standard[92]" value="III BCOM"><input type="hidden" name="Subject[92]" value="COM-38"><input type="hidden" name="date1[92]" value="16-01-07 00:00:00"><input type="hidden" name="UserType[92]" value="STUDENT"><input type="hidden" name="Userid[92]" value="admin"><input type="hidden" name="date_user_submitted[92]" value="2016-01-07  03:37:22 pm"></td><td><input id="radio01[145]" name="present[145]" type="radio" value="Present"><label for="radio01[145]"><span></span></label></td><td><input id="radio02[145]" name="present[145]" type="radio" value="Absent"><label for="radio02[145]"><span></span></label></td><td><input id="radio03[145]" name="present[145]" type="radio" value="Leave"><label for="radio03[145]"><span></span></label></td></tr><tr>

好的,现在我们已经驳斥了这个想法! 让我们从头开始。

PHP有几个可能会超出的参数,即

  • post_max_size 这意味着脚本不会接收所有的post数组

  • max_input_vars 限制

    <input>
    脚本将接受的变量数量

由于您至少有 1950个 输入变量,我知道这可能是第一个要检查的变量。因此,请在您的

php.ini
文件中查找这两个参数,然后让我知道它们是什么。

因此,从您的评论 看来

max_input_vars = 1000
,此脚本至少具有 1950个
变量似乎还不够。这肯定可以解释您得到的错误!我认为默认值为1000,这就是为什么要使用注释形式。

因此,为了安全起见,请修改

php.ini
and make
max_input_vars = 2500
;
当然不加评论。

*进行以下更改后, *别忘 了重新启动Apache

php.ini



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/391204.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号