Warning: Unknown: POST Content-Length of 53 bytes exceeds the limit of 0 bytes in Unknown on line 0

本文讨论了在局域网中使用PHP共享管理文件时遇到的文件上传限制问题,通过调整php.ini中的post_max_size配置,最终解决了普通表单提交过程中出现的错误提示,实现了大文件的正常上传。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


最近想在局域网中用PHP共享管理文件,考虑到可能会上传超大文件我把php.ini配置中post_max_size设为4096M,结果上传文件没有问题,普通的表单提交后出现如下的问题:

Warning: Unknown: POST Content-Length of 53 bytes exceeds the limit of 0 bytes in Unknown on line 0 Warning: Cannot modify header information - headers already sent in Unknown on line 0

折腾了很久,后来不断的更改post_max_size的值。

php.ini配置
post_max_size = 2048M

Warning: Unknown: POST Content-Length of 53 bytes exceeds the limit of -2147483648 bytes in Unknown on line 0 Warning: Cannot modify header information - headers already sent in Unknown on line 0

php.ini配置
post_max_size = 4096M

Warning: Unknown: POST Content-Length of 53 bytes exceeds the limit of 0 bytes in Unknown on line 0 Warning: Cannot modify header information - headers already sent in Unknown on line 0

最后发现发现post_max_size最大可以是2047M,普通表单提交没有问题。


转自: http://hi.baidu.com/venb26/item/353acce64572d5384ddcaf9d

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值