谁能告诉我什么触发用户上传大文件?最大输入时间或最大执行时间?

发布于 2024-10-07 15:03:59 字数 130 浏览 0 评论 0原文

谁能告诉我什么触发用户上传大文件?最大输入时间或最大执行时间?因为上传的开始是一个php进程。 ?

我允许用户最多上传 5MB。那么上面这两个的适当设置是什么?

因为当它太小而文件又那么大时,我只会得到一个空白页。

Can any one tell me what triggers then user is uploading a big file? max_input_time or max_execution_time ? since the start of the upload is a php process . ?

I am allowing users to upload 5MB max. So what would be the appropriate settings on those two above?

because when its too little and the file is that big i just get a blank page.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笑脸一如从前 2024-10-14 15:03:59

两者都会触发,但在过程中的不同时间触发:

  • max_input_time 是 PHP 解析请求并提供其 $_POST、$_FILE 等结构所需的时间。
  • max_execution_time 是解析请求后脚本可以运行的时间。

因此,我建议您在 PHP 脚本中进行某种日志记录(记录到文件,而不是浏览器),以查看脚本是否实际执行。如果它没有执行,那么 max_input_time 已经触发,如果它被执行,那么你的脚本可能花了太长时间并且 max_execution_time 已经触发。

但请注意,也可能有其他因素导致传递空白页面,因此您应该真正检查 php 和 apache 日志是否有任何错误。

Both trigger but at different times in the process:

  • max_input_time is the time that PHP takes to parse the request and provide its $_POST, $_FILE etc, structures.
  • max_execution_time is the time that your script may run after the request is parsed.

So I'd suggest you do some kind of logging (to a file, not to the browser) in your PHP script to see if the script is actually executed. If it is not executed, then max_input_time has triggered, if it is executed, then your script probably took too long and max_execution_time has triggered.

note though, there may also be other factors leading to a blank page being delivered, so you should really check your php and apache logs for any errors.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文