Textarea不发送长文本,短文本也可以
我有表单:
<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>
如果我在文本区域中输入短文本并提交,那么在 script.php 中,我的文本已经在变量 $_POST['text']
中。但是,如果文本长度约为 70000 个字符,则它不在 $_POST['text']
中。我可以从 Firebug 中看到网络日志,并且我的文本采用编码字符串形式,由浏览器发送到服务器。但在 $_POST
数组中我的文本丢失了。
这个问题我只在生产服务器上遇到,当我在本地主机上测试这个脚本时,它也适用于长文本。
是否有任何服务器选项限制 post 值的 maxlen?
在PHPinfo中,我可以看到post_max_size
设置为20M,肯定还有另一个问题,但我自己解决不了:-(
有什么想法吗?
坦克。
I have 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>
If I type short text into a textarea and submit, then in script.php I already have my text in variable $_POST['text']
. However if the text is about 70000 character long, it isn't in $_POST['text']
. I can see net log from Firebug and my text is in encoded string, which was sent by my browser to the server. But in $_POST
array is my text missing.
This problem I have only on production server, when I test this script on localhost, it works also with long texts.
Is there any server option, which limits maxlen of post values?
In PHPinfo, I can see post_max_size
set to 20M, there must be another problem, but I can't solve it on my own :-(
Any ideas?
Tanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 Eda 的评论
As per Eda's Comment