當網頁執行時經常出現以上情形時, 可試著修改 php.ini 內的設定。 (php.ini 位於 C:WINDOWS下)
然後確認是否 output_buffering 的參數有被設定。
在Appserv 2.5.10 中 output_buffering 預設是被設成 Off 的,如下說明。
|
; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP's output layer a
; bit. You can enable output buffering during runtime by calling the output
; buffering functions. You can also enable output buffering for all files by
; setting this directive to On. If you wish to limit the size of the buffer
; to a certain size - you can use a maximum number of bytes instead of 'On', as
; a value for this directive (e.g., output_buffering=4096).
output_buffering = Off
|
只要將 output_buffering = Off 改成 output_buffering = 4096 就ok啦! |