Header() help!
Posted: Fri Mar 13, 2009 5:33 am
Hi guys,
I'm having a problem redirecting between my pages. I have a page which I want to continue to execute after i've redirected the user.
I've simulated that page doing work with the sleep command. The redirect only occurs after the sleep has completed.
test1.php
whatever.php
Why does PHP wait 60 seconds before sending the header to redirect the page?
I've tried a flush(); after the header but that doesn't work either.
Any ideas?
I'm having a problem redirecting between my pages. I have a page which I want to continue to execute after i've redirected the user.
I've simulated that page doing work with the sleep command. The redirect only occurs after the sleep has completed.
test1.php
Code: Select all
<?php
header("Location: http://whatever.php");
sleep(60);
?>Code: Select all
<?php
echo("You got here!");
?>I've tried a flush(); after the header but that doesn't work either.
Any ideas?