PHP警告 Warning: Cannot modify header information - headers already sent

在运行PHP程序的时候收到下面的警告信息:Cannot modify header information - headers already sent

警告信息如下:
Warning: Cannot modify header information - headers already sent by (output started at D:\Dkits\Apache2.2\htdocs\foxridge\core\https_detect.php:100) in D:\Dkits\Apache2.2\htdocs\foxridge\core\sessions.php on line 40

Warning: Cannot modify header information - headers already sent by (output started at D:\Dkits\Apache2.2\htdocs\foxridge\core\https_detect.php:100) in D:\Dkits\Apache2.2\htdocs\foxridge\core\sessions.php on line 41

这个信息通常是因为在打开和关闭PHP标签(<?php . . . ?>)的时候有空格。

根据提示的信息检查文件https_detect.php

发现在?>的后面确实有2个回车符,删除这两个回车符后,程序能够正常的运行。有可能是在<?php标签的前面和?>标签的后面,需要仔细检查一下。