问题描述
我想知道是否有人知道全局帖子的总长度.例如:
$_POST['formInput'] = "hello world,我能待多久?";
我正在创建一个站点,在该站点中,有人会在 textarea 中输入未知数量的字符,因此它可能是 word 文档中的 2 页.因此,如果有人知道除了使用 post global 之外我还可以如何做到这一点的任何其他方法?(它不能保存在文件中,因为它的重要数据我不想让其他人找到)这将非常有帮助.
谢谢
解决方案检查您的 php.ini 中的
<预>;PHP 将接受的 POST 数据的最大大小.post_max_size = 8Mpost_max_size
.默认情况下,这通常约为 8mb,但如果您使用的是共享主机,则肯定会有所不同.
如果您希望向服务器发送大量数据,则必须使用 $_POST
.为了进一步研究,我建议查看 POST Method Uploads 在文档中.
I was wondering if anybody knows the total length that a post global could be. e.g:
$_POST['formInput'] = "hello world, how long can i be?";
I am creating a site where someone will enter an unknown amount of chars into a textarea, so potentially it could be 2 pages on a word document. So if anybody knows of any other methods of how i can do this apart from using a post global? (it cant be saved in a file, as its important data that i dont want other people to find) That would be very helpful.
Thanks
Check your php.ini for post_max_size
. This is typically about 8mb by default, but if you're on shared-hosting, it could definitely vary.
; Maximum size of POST data that PHP will accept. post_max_size = 8M
You'll have to use $_POST
if you wish to send large amounts of data to the server. For further study, I'd suggest checking out POST Method Uploads in the documentation.
这篇关于PHP:post 全局变量的总长度是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!