PHP:无法上传大文件 [英] PHP: Having trouble uploading large files
问题描述
我正在使用PHP进行文件上传,在我的本地主机上对2.8MB大小的文件工作正常 - 但不是我的Mediatemple GS主机。小于2MB的文件可以正常工作,但任何大的文件似乎都不起作用...我没有收到任何错误消息,但是当上传完成时,文件在上传目录中找不到...
I am doing a file upload using PHP, which works fine for a file of size 2.8MB on my localhost - but not my Mediatemple GS host. Files smaller than 2MB work fine, but anything larger seems to not work... I am not getting any error message but when the upload finishes, the file is not found in the uploads directory...
我搜索了一下,并在.htaccess文件中添加了以下内容:
I googled around, and I added the following lines to the .htaccess file:
php_value memory_limit 120M
php_value max_execution_time 120
php_value upload_max_filesize 10G
php_value post_max_size 10G
我知道上面的一些值是一个矫枉过正的,但即使如此,这似乎没有帮助...任何其他我可能会失踪?
I know some of the above values are a overkill, but even then, this does not seem to help... Anything else I might be missing?
推荐答案
你错过的是 max_input_time ,并检查您的编辑是否反映在 phpinfo();
。
The one you missed is max_input_time, and do check whether your edits are reflected in phpinfo();
.
这篇关于PHP:无法上传大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!