Apache 檔案上傳限制設定
1.Apache的httpd.conf
2.PHP的phi.ini
httpd.conf的部份
< f i l e s >
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
註:524288是512*1024,單位為bit
< / f i l e s >
php.ini的部份
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 20000
;Maximum execution time of each script, in seconds
max_input_time = 20000
; Maximum amount of time each script may spend parsing request data
memory_limit = 50M
; Maximum amount of memory a script may consume (50MB,default =8MB)
post_max_size = 50M
; Maximum size of POST data that PHP will accept.
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
upload_max_filesize = 100M
1.Apache的httpd.conf
2.PHP的phi.ini
httpd.conf的部份
< f i l e s >
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
註:524288是512*1024,單位為bit
< / f i l e s >
php.ini的部份
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 20000
;Maximum execution time of each script, in seconds
max_input_time = 20000
; Maximum amount of time each script may spend parsing request data
memory_limit = 50M
; Maximum amount of memory a script may consume (50MB,default =8MB)
post_max_size = 50M
; Maximum size of POST data that PHP will accept.
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
upload_max_filesize = 100M