-1

I get this problem and I can't solve it. At the following logout.php script .

<?php

session_start();
error_reporting(E_ALL ^ E_NOTICE); 
ini_set('display_errors', 'On');

session_destroy();

 header('Location: index.php');  

exit;  
?>

Always I get this:

Warning: Cannot modify header information - headers already sent by (output started at /home/traningi/public_html/logout.php:3) in /home/traningi/public_html/logout.php on line 11

I try some things but doesn't work

Trinimon
  • 13,839
  • 9
  • 44
  • 60

2 Answers2

1

Try removing the closing php tag '?>' from your script. That might help. More information on that here

Community
  • 1
  • 1
tworabbits
  • 1,203
  • 12
  • 17
1

See if there is blank space before very first <?php of your page. if so then Remove space

Pranay Aher
  • 444
  • 4
  • 11