如何从下载停止的最后一点开始下载PHP中的文件?

发布于 2025-01-30 22:42:18 字数 424 浏览 3 评论 0原文

我想下载带有PHP的大型冬青文件,但是由于使用共享托管,有时我会遇到超时错误,并且文件下载仍然不完整,如果由于任何原因下载,我想要下载,并且脚本再次称为文件要从下载停止并加入上一个文件的最后一点开始下载,但是我不希望该文件在下载完成后有缺陷。

我的简单代码:

<؟php
set_time_limit(0);
file_put_contents("Solidworks.Premium_2021_SP1_Windows.part1.rar", fopen("https://dl1.wikishare.ir/sdlftpuser02/Category99/Engineering/Solidworks/Solidworks.Premium_2021_SP1_Windows.part1.rar", 'r'));
?>

任何指导和帮助将不胜感激。

I want to download a large holly file with PHP, but due to the use of shared hosting, sometimes I encounter a TIMEOUT error and the file download remains incomplete, I want if the download is stopped for any reason and the script again I called the file to start downloading from the last point where the download was stopped and join the previous file, however I do not want the file to be defective after the download is complete.

My simple code:

<؟php
set_time_limit(0);
file_put_contents("Solidworks.Premium_2021_SP1_Windows.part1.rar", fopen("https://dl1.wikishare.ir/sdlftpuser02/Category99/Engineering/Solidworks/Solidworks.Premium_2021_SP1_Windows.part1.rar", 'r'));
?>

Any guidance and help will be greatly appreciated.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文