文件上传可以在 PHP 中超时吗? [英] Can file uploads time out in PHP?

查看:15
本文介绍了文件上传可以在 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

这篇关于文件上传可以在 PHP 中超时吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆