gpt4 book ai didi

php - 大文件上传问题

转载 作者:搜寻专家 更新时间:2023-10-31 21:08:36 25 4
gpt4 key购买 nike

我想使用普通的 php 表单上传最多 10GB 的文件。但是在增加以下值之后,

upload_max_filesize
post_max_size
php_value upload_max_filesize
php_value post_max_size
request_terminate_timeout
FcgidMaxRequestLen

我可以毫无问题地上传最大 3GB 的文件。但是,当超出此范围时,将文件从本地服务器传输到正在使用的 CDN 时会出现超时问题。我还使用进度条指示上传过程,该过程在发生超时问题时停止。

最佳答案

你可以这样设置时间限制:

<?php
set_time_limit(0);//unlimited

不建议设置为无限制,但您可以尝试一下,一旦您对调整时间有了很好的估计。


set_time_limit

(PHP 4, PHP 5)
set_time_limit — Limits the maximum execution time

关于php - 大文件上传问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27394281/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com