Hello
Im' trying to make executing a long script and redirect without waiting for the end the the script...it doesn't work
here is the idea
flush(): include('longscript.php'); header('location:toto.php');
any idea ? thanks
read up on [man]set_time_limit[/man] and [man]ignore_user_abort[/man]
adam
Stick an exit after your header. All header does is send a location header in the http header. However, it does not halt the script, for this you need exit or die.
Originally posted by bubblenut Stick an exit after your header. All header does is send a location header in the http header. However, it does not halt the script, for this you need exit or die.
I tryied...after the header the code is not executed...
the code shouldn't be executed after header(), as this redirects to another page
Originally posted by weekender the code shouldn't be executed after header(), as this redirects to another page
exact
Originally posted by weekender read up on [man]set_time_limit[/man] and [man]ignore_user_abort[/man] adam
did you do this, cause this is what you need to do what you are asking!
It shouldnt, but it might. So it is safer to avoid unusual cases completely.
Originally posted by weekender did you do this, cause this is what you need to do what you are asking!
I put ignore_user_abort in my include;.time limit no need
seems to work with
flush() include("script.php"); header(location:...);
Originally posted by fredouille seems to work with flush() include("script.php"); header(location:...);
but this is the original script you had - so what was the problem?
Originally posted by weekender but this is the original script you had - so what was the problem?
yes it working..but don't really knows if the redir is done while executing the include script...