因PHP文件编码引起的session报警
某年某月某日调试PHP,忽而蹦出一个警告
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent by (output started at…
奇了怪,session_start()之前没有任何输出,怎么回事?NN久之后,偶使用notepad++发现,原来不知怎的config.inc.php文件编码变成ASCII,而我其他文件都是UTF-8。. 转成”UTF-8 无DOM格式编码”, 问题解决 oh yeah
PS: VIM也可以完成编码的转换,打开一gbk文件,在Command-line Mode下输入:set fileformat=unix ,然后设置编码:set fileencoding=utf-8 ,保存即可:wq
本文固定链接: http://mifunny.info/warning-header-ready-send-before-session-start-299.html
此站点遵守 知识共享协议! 转载请注明文章出处及本文链接,非常感谢!
关键字: php
此站点遵守 知识共享协议! 转载请注明文章出处及本文链接,非常感谢!
关键字: php
