ini_set('upload_max_filesize', '3G');
ini_set('post_max_size', '3G');
ini_set('max_input_time', 30 * 60);
ini_set('max_execution_time', 30 * 60);
至于 memory_limit 适当设置大一些,但不是必需的。
传输速度受限于服务器性能和机房带宽,以及客户网络状况,浏览器一般也有速度上限(chrome,firefox大致 15 MiB/s)
除了 PHP 这些优化,Web 服务器(如 nginx)也是一个需要优化的地方。
下文大概有很大帮助:
https://github.com/owncloud/documentation/wiki/Uploading-files-up-to-16GB