无法修改标题信息 - 已发送的标题(附代码)

问题描述:

为什么会发生此错误?代码如下:无法修改标题信息 - 已发送的标题(附代码)

<?php 
header('Cache-Control:no-cache,must-revalidate,max-age=0');  
?> 
+0

为什么这个标签为phpmailer?没有代码。 –

+0

我也觉得你不包括完整的代码。在任何一种情况下,请咨询重复问题已关闭。 –

您可以尝试以下操作:

<?php 

header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); 
header("Cache-Control: post-check=0, pre-check=0", false); 
header("Pragma: no-cache"); 
?> 

注意,使用将取决于你的需要的确切头(如果你需要支持HTTP 1.0和/或HTTP 1.1)

+1

jParmar仍然是相同的错误。 – tassawar

+0

请指定确切的错误。如果相关,您可以发布其他代码 – jParmar