PHP 错误:Warning: Cannot modify header information - headers already sent by ...
摘要:PHP初学者容易遇到的错误:Warning: Cannot modify header information - headers already sent by ...; 通常是由不正确使用 header,session_start ,setcookie等方法导致的,下面以session使用错误为例,其余几种解决方案类似; 先给出解决方案再解释,如果急着用就不用看解释了。 解决方案一:保存php文件编码为utf-8无BOM码,具体操作可以用notepad++等编辑器完成,把 sesstion_start() 放在文档所有输出(包括html标签和php的输出语句,具体以实际运行后有无...
阅读全文
posted @ 2014-02-18 16:48
浙公网安备 33010602011771号