For what I know is it is not possible to send HTTP headers after your output has been sent and only way to workaround is to use output buffering
But my PHP script is able to send headers even after output is sent. here is my code
Text output already sent
<?php
header('Location: test2.php');
die();
?>
Why is this code not giving error for "HTTP headers already sent" Is there another way to turn output buffering on?
EDIT:
I am running it on my localhost using wamp
No files are included in the above code
I just noticed outbut_buffering directive in phpinfo() which is set to 1 But when I check it in php.ini file it is set to Off