上载文件时克服主机对PHP/POST数据的最大文件大小限制? [英] Overcome host's max file size limit for PHP/POST data when uploading files?

查看:92
本文介绍了上载文件时克服主机对PHP/POST数据的最大文件大小限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在使用一个相当普通的低成本(共享)主机(因为这是我现在所能负担的全部费用),并且希望在页面上实现一个非常基本的文件上传功能.我想允许最大100MB的文件上传到服务器,但是我的免费主机将PHP_MAX_FILESIZE限制为32MB,将POST_FILESIZE限制为64MB.

I'm with a fairly mediocre low-cost (shared) host at the moment (as it's all I can afford just now) and want to implement a very basic file upload feature on a page. I want to allow files of up to 100MB to be uploaded to the server but my free host limits the PHP_MAX_FILESIZE to 32MB and the POST_FILESIZE to 64MB.

有什么方法可以克服这个问题,而无需用户将较大的文件拆分为较小的块?一个基于JavaScript或基于Flash的解决方案,也许可以以某种方式通过不同的HTTP请求来路由文件的某些部分,或者通过某种其他方式来绕过32MB的限制?

Is there any way of overcoming this without requiring the user to split the larger files into smaller chunks? Either a JavaScript or Flash-based solution which could perhaps somehow route parts of the file through different HTTP requests or some other way to get around the 32MB limit?

或者我可以尝试执行任何可能超出主机限制的命令吗?我已经尝试使用.htaccess失败了.也尝试过ini_set.我认为唯一的方法是某种分块/拆分/多流处理,或者另一种解决无法设置较高PHP值的方法.

Or are there any commands I can attempt to make which might over-ride the host's limits? I've already tried using .htaccess without success. also tried ini_set. I'm thinking the only way is some kind of chunking/splitting/multi-streaming or another way to solve the inability to set higher PHP values.

任何建议都将不胜感激.谢谢.

Any suggestions are hugely appreciated. Thanks.

推荐答案

您可以使用Flash.从此开始: http://soenkerohde.com/2010/01/chunk-file-上传/

You can use Flash. Start with this: http://soenkerohde.com/2010/01/chunk-file-upload/

OR

使用 https://github.com/moxiecode/plupload

这篇关于上载文件时克服主机对PHP/POST数据的最大文件大小限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆