Log in to your account using SSH.
Use a text editor to add the following line to the .htaccess file. Replace xx with the maximum upload file size that you want to set, in megabytes:
php_value upload_max_filesize xxM
Add the following line to the .htaccess file. Replace xx with the maximum HTTP POST file size that you want to set, in megabytes:
php_value post_max_size xxM
3 回答
您可能希望更改网站的最大上传文件大小 . 例如,您可以设置下限以防止用户将大型文件上传到您的站点 . 为此,请更改.htaccess文件中的upload_max_filesize和post_max_size指令 .
要更改PHP脚本的最大上载文件大小,请按照下列步骤操作:
将更改保存到.htaccess文件并退出文本编辑器 . 要验证新设置是否处于活动状态,请在.htaccess文件所在的同一目录中创建一个包含以下代码的PHP测试文件:
在Web浏览器中加载测试文件,然后搜索该指令的名称 . “本地值”列应显示您在.htaccess文件中指定的新设置 .
了解更多详情http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/
要么
有关不同的可用方法,请参阅PHP change the maximum upload file size .
您可以使用多个上传页面(取决于您要设置的上传器限制),使用不同的.htaccess配置存储在不同的目录中,这样您就可以按上传限制对用户进行分组 .
将此添加到您的PHP