我遇到了这个问题,我无法解决。在以下logout.php
脚本中。
<?php
session_start();
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', 'On');
session_destroy();
header('Location: index.php');
exit;
?>
我总是得到这个:
警告:无法修改标头信息 - 已发送的标头 (输出从/home/traningi/public_html/logout.php:3开始) 第11行/home/traningi/public_html/logout.php
我尝试了一些但不起作用的事情
答案 0 :(得分:1)
尝试删除关闭的php标记&#39;?&gt;&#39;从你的脚本。这可能有所帮助。 有关here
的更多信息答案 1 :(得分:1)
在页面的第一个<?php
之前查看是否有空格。如果是,则删除空格