PHP: Having trouble uploading large files(PHP:上传大文件时遇到问题)
问题描述
我正在使用 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:上传大文件时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PHP:上传大文件时遇到问题


- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- PHP - if 语句中的倒序 2021-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01