一、PHP使用session時出現的報錯如下:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent
解決方法:
1、php.ini中的output_buffering=off 改成output_buffering=4096
2、php.ini中的session.save_path是否設置好了
3、pgp.ini中的session.auto_start = 0 改成session.auto_start = 1
4、php代碼session_start() 前面不能有輸出,而且必須放在首行;在session_start()的php代碼之前的任何字符都被看作headers。即將<? session_start();.......?>放到文件首,并且<? 前面不能有任何字符
若上述四種方法不能解決可以用UltraEdit-32的UTF-8另存為了一下。
二、php使用session時出現的報錯,如下:
Warning: session_start(): Cannot start session when headers already sent in
Warning: Cannot modify header information - headers already sent by (output started at
這里的報錯就是有多余的空格,如下圖。
將多余的空格去掉,就可以了。
推薦:php服務器
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com