I was looking at an application with the following code snippet:
ob_start();
session_name('f oo');
session_start() ;
if (!$_SESSION['bar']) {
header("Locatio n: http://" . $_SERVER['HTTP_HOST'] .
dirname($_SERVE R['PHP_SELF']) . "/index.php");
ob_end_clean();
exit();
}
I am under the impression that the "header" redirection is immediate.
Am I correct or will the 'ob_end_clean() ' and 'exit()' actually
process.
Tom
ob_start();
session_name('f oo');
session_start() ;
if (!$_SESSION['bar']) {
header("Locatio n: http://" . $_SERVER['HTTP_HOST'] .
dirname($_SERVE R['PHP_SELF']) . "/index.php");
ob_end_clean();
exit();
}
I am under the impression that the "header" redirection is immediate.
Am I correct or will the 'ob_end_clean() ' and 'exit()' actually
process.
Tom
Comment