设置 php.ini 上传文件
{Basic Change}
- file_uploads = on ;
- upload_tmp_dir ;//maybe you don't need to change this
- upload_max_filesize = 8m ; //from 2m to 8M or bigger
- post_max_size = 8m ;
如果需要上传较大文件, 同时修改下面的参数
{Advantage Change}
- max_execution_time = 600 ;
- max_input_time = 600 ;
- memory_limit = 8m ;//the amount of memory every page can use.
{Final List}
max_execution_time = 600 max_input_time = 600 memory_limit = 32m file_uploads = on upload_tmp_dir = /tmp upload_max_filesize = 32m post_max_size = 32m
简单的说,一般上传小于2M不用修改,2-8M简单修改(第一部分),大于8M复杂修改,增加执行时间这些。应该是越来越不安全。
留言
Joao
2015-03-14 15:52:34Good points all around. Truly aperdciatpe.