Blogger Information
Blog 2
fans 0
comment 0
visits 2049
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP上传文件为空或出错时需要的设置。
技术派-飞鱼
Original
652 people have browsed it

在php.ini,需要设置:

1、修改 post_max_size 设定 POST 数据所允许的最大大小。

2、参数upload_max_filesize 表示所上传的文件的最大大小。

另外要说明的是,post_max_size 大于 upload_max_filesize 为佳.

最后,还有WebServer需要修改:

如果是Apache,需要修改:
LimitRequestBody 524288将524288(=512×1024)改大,比如5M(=5×1024×1024)!

如果是Nginx,需要在http段添加:

client_max_body_size 100m;

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!