PHP setcookie() cannot modify header information 的解决方法

使用setcookie()函数时总是报以下错误: 
Warning: Cannot modify header information - headers already sent by.... 
最简单的解决方法:
打开 php.ini 然后把output_buffering = Off 改为 output_buffering = On。重起apache,OK

你可能感兴趣的:(PHP,开发,setCookie)