简体   繁体   English

在PHP中上传加载大文件

[英]Upload load big size file in PHP

I need to upload big size file by web page in PHP, as I surveyed, there are three variables related to upload. 我需要通过PHP在网页上上传大型文件,据我调查,有三个与上传有关的变量。

  • post_max_size=100MB post_max_size = 100MB
  • upload_max_filesize=100MB upload_max_filesize = 100MB
  • memory_limit memory_limit

If I want to upload file under 100 MB, is that right just set size to 100 MB? 如果我要上传100 MB以下的文件,那么将大小设置为100 MB正确吗? and how much should I give to memory_limit for 100 MB file; 对于100 MB的文件,我应该给memory_limit多少钱; Is there any other issue may cause the file can't finished upload. 还有其他问题可能导致文件无法完成上传。

The memory limit will be difficult because it depends on how you wish to process the file. 内存限制将很困难,因为它取决于您希望如何处理文件。 If you're just going to write it to the disk without much processing, 100MB should be fine. 如果您只是不做太多处理就将其写入磁盘,则100MB应该可以。 If you're going to do any extensive processing on it, you may very well need to increase it higher depending on how your algorithm is handling memory usage. 如果要对其进行任何广泛的处理,则可能非常需要根据算法处理内存使用情况的方式将其增加一些。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM