Home  >  Article  >  Backend Development  >  批改php上传文件大小的限制

批改php上传文件大小的限制

WBOY
WBOYOriginal
2016-06-13 10:39:30794browse

修改php上传文件大小的限制
修改php上传文件大小的限制

第一步:修改在php下POST文件大小的限制
1.编修php.ini
post_max_size = 8M 改为 post_max_size = 20M
upload_max_filesize = 2M 改为 upload_max_filesize = 20M
memory_limit = 16M(默认为8M) 由于上传大文件比较费时,所以
max_execution_time 设为800

第二步: Apache环境中的档案上传大小控制
修改位于Apahce目录下的httpd.conf
添加下面内容
LimitRequestBody 20000000  重新启动apache

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PHP 惯用数组Next article:PHP 取现阶段月头跟月尾