當(dāng)前位置:首頁>
thinkphp>
如何解決thinkphp更新文件時遇到的:Cannot send session cache limiter – headers already sent
新聞中心
如何解決thinkphp更新文件時遇到的:Cannot send session cache limiter – headers already sent
作者 / 無憂主機(jī) 時間 2013-11-21 18:10:44
問題展現(xiàn):
用戶描述“我的ThinkPHP在后臺更新完文件以后就出現(xiàn)了提示:Cannot send session cache limiter - headers already sent,然后前臺的網(wǎng)站上面就有兩個警告,如下圖:
”。
問題分析:
session_start();是全局變量,根據(jù)使用情況來說,此函數(shù)前面是不能存在東西的(代碼)。從網(wǎng)站首頁錯誤提示來看,報錯文件是OpenSociax.php,于是小編根據(jù)以往的
編程經(jīng)驗來操作了一下,問題如實解決。
解決方法:
無憂小編桂桂利用以往的經(jīng)驗進(jìn)行了以下操作,
通過FTP工具下載提示上的指定文件OpenSociax.php到本地。
利用高級記事本(Notepad++)打開編輯,把第16行的session_start();注釋掉。操作后,
保存后,上傳到空間,進(jìn)行測試。
結(jié)果網(wǎng)站首頁沒有警告了,方案成功。
本文地址:http://m.love62.cn/thinkphp/13208.html
![1](/wp-content/themes/starow_z/img/o-1.png)
![1](/wp-content/themes/starow_z/img/o-2.png)
![1](/wp-content/themes/starow_z/img/o-3.png)
![1](/wp-content/themes/starow_z/img/o-4.png)
![1](/wp-content/themes/starow_z/img/o-5.png)
![1](/wp-content/themes/starow_z/img/o-6.png)
![1](/wp-content/themes/starow_z/img/o-7.png)