修改php.ini更改允許上傳檔案的大小
Temperature: 0 °C
使用vi或vim開啟php.ini
#vim /etc/php/apache2/php.ini
找到以下位置並修改
可以使用?指令做查詢
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 16M ; Maximum amount of memory a script may consume (16MB)
;Maximum size of POST data that PHP will accept.
post_max_size = 8M
;Maximum allowed size for uploaded files.
upload_max_filesize = 2M <--可上傳更大的檔案預設值是2M
使用插入做修改
i
離開vim編輯
:wq <--儲存並且離開
重新啟動 apache
#sudo /etc/init.d/apache2 restart
以上紀錄