加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – Textarea不发送长文本,短文本也可以

发布时间:2020-12-13 22:33:13 所属栏目:PHP教程 来源:网络整理
导读:我有形式: form method='post' action='script.php' textarea id='main' name='text'/textarea input type='hidden' name='id' value='1' input type='hidden' name='a' value='ulozitclanek' input type='submit' name='button' value='Save'/form 如果我
我有形式:

<form method='post' action='script.php'>

    <textarea id='main' name='text'></textarea>

    <input type='hidden' name='id' value='1'> 
    <input type='hidden' name='a' value='ulozitclanek'> 
    <input type='submit' name='button' value='Save'>

</form>

如果我在textarea中输入短文并提交,那么在script.php中我已经在变量$_POST [‘text’]中输入了我的文本.但是,如果文本长度大约为70000字符,则不在$_POST [‘text’]中.我可以看到来自Firebug的网络日志,我的文本是编码字符串,由我的浏览器发送到服务器.但在$_POST数组中我的文字丢失了.

这个问题我只在生产服务器上,当我在localhost上测试这个脚本时,它也适用于长文本.

是否有任何服务器选项,它限制发布值的maxlen?

在PHPinfo中,我可以看到post_max_size设置为20M,必须有另一个问题,但我无法自己解决:-(

有任何想法吗?

坦克.

解决方法

根据Eda的评论

Problem solved. It was limit for POST variables on server. Thnx for your time and be careful about webhosting config. I’ve lost several hours by solving this problem

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读