修改php.ini上傳更大的檔案
修改php.ini
修 改了php.ini大檔案還是無法上傳
upload_max_filesize = 500M
還要再修改
post_max_size
memory_limit
這三個數值的大小,必須是 memory_limit > post_max_size > upload_max_filesize
參考阿欣部格!!
使用 phpinfo.php 去找到 php.ini 的位置
upload_max_filesize = 500M
還要再修改
post_max_size
memory_limit
這三個數值的大小,必須是 memory_limit > post_max_size > upload_max_filesize
參考阿欣部格!!
使用 phpinfo.php 去找到 php.ini 的位置
/etc/php5/apache2/php.ini
修改
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 600 ; Maximum execution time of each script, in seconds
max_input_time = 600 ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 64M ; Maximum amount of memory a script may consume (16MB)
;;;;;;;;;;;;;;;;;;;
max_execution_time = 600 ; Maximum execution time of each script, in seconds
max_input_time = 600 ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 64M ; Maximum amount of memory a script may consume (16MB)
Maximum allowed size for uploaded files.
upload_max_filesize = 64M
Maximum size of POST data that PHP will accept.
post_max_size = 64M
post_max_size = 64M
改好後 apache 要重啟
sudo /etc/init.d/apache2 restart
如果要上傳更大的檔案的參考設定
max_execution_time = 300
max_input_time = 600
memory_limit = 160M
post_max_size = 500M
upload_max_filesize = 600M (要大於 post_max_size 的數值)
max_input_time = 600
memory_limit = 160M
post_max_size = 500M
upload_max_filesize = 600M (要大於 post_max_size 的數值)
沒有留言:
張貼留言