简体   繁体   English

2 mb后下载文件失败(php)

[英]downloading file fails after 2 mb (php)

i want to download a file from a remote server. 我想从远程服务器下载文件。 i already tried fopen etc. without success, so i tried using system /shell and wget but wget also fails after 2000 kb. 我已经尝试过fopen等,但是没有成功,所以我尝试使用系统/ shell和wget,但是wget在2000 kb之后也会失败。 are you familiar with this issue of Do you have a clue how to bypass/reset this limitation? 您是否熟悉此问题?您有线索了解如何绕过/重置此限制吗?

在php.ini文件中,将memory_limit增加到12M(例如)。

Is the file taking awhile to download? 该文件需要一段时间才能下载吗? If so you might need to adjust your script timeout in php. 如果是这样,您可能需要在php中调整脚本超时。 Assuming your request isn't a hard timeout from apache, you're going to want to look at your resource limits in php. 假设您的请求不是来自Apache的硬超时,那么您将要查看php中的资源限制。

Mine look like this: 我的看起来像这样:

max_execution_time = 300
max_input_time = 120
memory_limit = 128M

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM