PHP header location-redirect doesn't work - why?

Posted by Industrial on Stack Overflow See other posts from Stack Overflow or by Industrial
Published on 2010-04-25T21:37:44Z Indexed on 2010/04/25 21:43 UTC
Read the original article Hit count: 177

Filed under:
|
|
|

Hi guys,

Here's my file. It doesn't throw an error or redirects to index.php. What is wrong? I have turned output buffering on/off, but nothing makes it redirect. What can I do?

<?
error_reporting(E_ALL);
echo 'This is an error';

header("Location: login.php");
die();
?>

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about header