ob_end_clean and header redirecting

From: Date: Sun, 22 Sep 2002 01:39:22 +0000
Subject: ob_end_clean and header redirecting
Groups: php.general 
Request: Send a blank email to php-general+get-117131@lists.php.net to get a copy of this message
function return_exit() { if (EXIT_AFTER_REDIRECT == 1) { return exit(); } } //// // Redirect to another page or site function redirect($url) { header('Location: ' . $url); return_exit(); } ob_start(); echo "<script></script>"; ob_end_flush(); ob_end_clean(); redirect($PHP_SELF); here is a test i'm trying to be able to send script into the header and then be able to redirect ones the script output has finished, it states in the manual that ob_end_clean : "This function discards the contents of the output buffer and turns off output buffering. " so can it remove the buffered output somehow onces it has been flushed before i redirect ? its an issue i'd like to solve sure there is document.location but i'd prefer to stick with header for redirecting let me know

« previous php.general (#117131) next »