fbpx
Home » 程式網站設計

Warning: session_start(): Cannot send session cache limiter – headers already sent

No Comment

phpm

session 錯誤訊息 Warning: session_start(): Cannot send session cache limiter – headers already sent

而是在session 之前就輸出 html 字串了

cookie 和 session 在使用和宣告之前一定不能輸出html字串

否則一定會出現 headers already sent (output … 訊息的

而一勞永逸的解決方法是在 後面加上 ob_start(); 緩衝一下html輸出~~

Comments

comments

標籤: