可能重复:
Headers already sent by PHP警告:当我使用标题('Location:index.php)在PHP中的消息?
当我使用头(“位置:的index.php)在PHP代码它显示该错误消息。
警告:无法修改头文件信息 - 在D:\ xampp \ htdocs \ OnlineCode中已经发送的头文件(输出在D:\ xampp \ htdocs \ OnlineCode \ online \ survey \ code \ index.php:55中发送) \ online \ survey \ code \ index.php on line 62
我该如何解决这个问题?
你已经发送了一些输出,例如。一些空格,标题必须在ANY输出之前发送 – Alex
迂腐笔记:根据HTTP规范,Location需要完整的URL,而不是相对路径。另外,你是否试图谷歌这个?每10分钟询问一次。 – Corbin
肯定重复:http://stackoverflow.com/questions/1827314/cannot-modify-header-information-headers-already-sent-why-its-happening和http://stackoverflow.com/questions/8028957/headers-已发送逐PHP –