文件上传可以在 PHP 中超时吗?

2022-01-09 00:00:00 upload php

我对 PHP 很陌生,我创建了一个表单,用于将非常大的 csv 文件上传到我的服务器.有人向我提到,由于上传文件太大,浏览器会超时,这是真的吗?如果可以,是否可以预防?

Hi im quite new to PHP, i have created a form for very large csv files to be uploaded to my server. Some one mentioned to me that the browser can time out due to the uploading file being to big, is this true? and if so, can it be prevented?

感谢您的帮助!

推荐答案

您需要为以下 php.ini 设置适当的值:

You need a proper value for the following php.ini settings:

  1. max_input_time (不是 max_execution_time!)
  2. upload_max_filesize
  3. post_max_size
  1. max_input_time (not max_execution_time!)
  2. upload_max_filesize
  3. post_max_size

也许

  1. memory_limit

相关文章