我有一个包含 15 个字段的 php 网页.用户将使用它来上传图像.我通过上传 15 张 jpg 图像进行了测试,每张大约 2 M,没有任何问题.在我发布的那天,我将把这个网页移动到另一个 Linux 共享主机环境(仍然不确定是哪个).是否有一些网络托管环境会限制一个 http 请求中的总上传大小?
I have a php web page with 15 fields. The user will use it to upload images. I tested this by uploading 15 jpg images, each about 2 M, without any problems. On the day I launch, I will be moving this web page to another Linux shared hosting environment (still not sure which). Are there some web hosting environments that limit the size of total uploads in one http request?
是的.有(据我所知)三个左右会影响上传大小限制的配置设置:
Yes. There are (as far as I can remember) three or so configuration settings which will affect upload size restrictions:
upload_max_filesize
,设置上传文件大小的上限post_max_size
,限制发布数据的总大小,包括文件数据max_input_time
,它限制允许脚本处理输入数据(包括发布的值)的时间长度upload_max_filesize
是对每个单独文件的限制;但是,post_max_size
是整个请求的上限,包括所有上传的文件.
upload_max_filesize
is a limit on each individual file; however, post_max_size
is an upper limit on the entire request, which includes all the uploaded files.
不同的托管环境会以不同的方式设置这些值,这可能会影响您在部署时的能力.
Different hosting environments will have these values set differently, which may affect your abilities upon deployment.
这篇关于PHP - 最大总上传大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!