修改PHP上传文件大小限制方法

配置php.ini文件(以上传512M以下大小的文件为例)

查找以下选项并修改:

file_uploads = On ;打开文件上传选项
upload_max_filesize = 512M ;上传文件上限

如果要上传比较大的文件,仅仅以上两条还不够,必须把服务器缓存上限调大,把脚本最大执行时间变长

post_max_size = 512M ;post上限
max_execution_time = 1800 ; Maximum execution time of each script, in seconds
max_input_time = 1800 ; Maximum amount of time each script may spend parsing request data
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)

本文链接:修改PHP上传文件大小限制方法

转载声明:本站文章若无特别说明,皆为原创,转载请注明来源:Krunk Zhou,谢谢!^^


Leave a Reply

Your email address will not be published. Required fields are marked *