Latest News

首頁 » TWE-Commerce-購物網站教學 » Linux架設Twe-Commerce購物網站的朋友常會碰到這個問題

Linux架設Twe-Commerce購物網站的朋友常會碰到這個問題

Linux架設Twe-Commerce購物網站的朋友常會碰到這個問題

如果出現:Warning: Cannot modify header information – headers already sent
的警告語…那應該如何處理呢?
答案是:
把php.ini的某的參數設定如下:

output_buffering = On

這樣就可以解了…..
; 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).

發佈留言