-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,620
  • 9
  • 42
  • 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,143
  • 10
  • 16
1

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

Pranay Aher
  • 442
  • 4
  • 11