如何通过 PHP 发送大文件而不使用 POST 并受服务器限制

发布于 2024-10-08 08:16:35 字数 104 浏览 0 评论 0原文

我们的服务器对 POST 文件大小(64MB)有限制,我们无法更改它,有没有办法通过 PHP 上传更大的文件来解决这个问题?或者除了使用 FTP 客户端之外还有其他方法吗?

谢谢

we have a server with a limit on POST file size (64MB) and we can't change that, is there a way to upload larger files through PHP to work around this? Or another method aside from using and FTP client?

Thanks

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

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

发布评论

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

评论(4

恍梦境° 2024-10-15 08:16:35

除非您能够更改服务器上的 PHP 设置(您尝试过 htaccess 吗?),否则您需要在客户端使用一个程序(Java,可能是 Flash),该程序将文件分成多个块并上传每个块单独一个。您的服务器将这些块合并起来,以便在文件全部上传后“重新创建”文件。

Unless you have the ability to change PHP settings on the server (have you tried htaccess?), you'll need to use a program on the client-end (Java, possibly Flash), that splits the file up into chunks and uploads each one individually. Your server combines the chunks to "re-create" the file after they are all uploaded.

半边脸i 2024-10-15 08:16:35

HTTP 并不适合传输非常大的文件。您应该考虑采用不同的协议。

HTTP isn't meant for transferring really large files. You should look into employing a different protocol.

拥醉 2024-10-15 08:16:35

ini_set()、脚本目录中的 php.ini.htaccess - 这些都不起作用?我的意思是,也许您不需要使用客户端的闪存使事情变得如此复杂,也许您可​​以采用其他方法。

ini_set(), a php.ini in script dir, .htaccess - neither of these don't work? What I mean is maybe you don't need to complicate things so much with that flash on client side, and maybe you'll can go other ways.

凉城 2024-10-15 08:16:35

您可以使用 PUT 方法发送数据。 post_max_size 不会影响这些请求。

You can send the data using the PUT method. post_max_size doesn't affect those requests.

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