(摘錄自他人網頁)
您可以使用 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)
Maximum allowed size for uploaded files.
upload_max_filesize = 64M
Maximum size of POST data that PHP will accept.
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 的數值)
沒有留言:
張貼留言