# Moodle 为何我一直获得错误信息 &quot;HTTP头部已经被设置&quot;

**URL:** <https://www.isharkfly.com/t/moodle-quot-http-quot/5654>\
**Category:** PHP\
**Created:** [September 28, 2012, 6:20pm UTC](https://www.isharkfly.com/t/moodle-quot-http-quot/5654 "2012-09-28T18:20:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [September 28, 2012, 6:20pm UTC](https://www.isharkfly.com/t/moodle-quot-http-quot/5654/1 "2012-09-28T18:20:41Z")

</div>

如果您看到这样的错误信息：[code]Warning: Cannot add header information - headers already sent by (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php on line 1322

Warning: Cannot add header information - headers already sent by (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php on line 1323

Warning: Cannot add header information - headers already sent by (output started at /webs/moodle/config.php:87) in /webs/moodle/login/index.php on line 54[/code]在您的"config.php"中，在最后的?\>之外还有空行或空格。 一些文本编辑器会添加这些空格或空行 - 例如：Windows的写字板 - 所以您必须使用一个其他的编辑工具来完全移除这些空格和空行。
