|
Posted by Rik on 01/05/07 21:35
Pawel Halastra FrT wrote:
> Elo,
> I'm having a terrible trouble with a simple, as I think, issue. I need
> to stop my script in the middle of proccesing, and, simultanously,
> start a new script. The idea is not to sent any output to web browser
> before the second script is done. Typical scenario should goes like
> this: - script a.php ends its execution with some error, instead of
> sending its output to the browser, a.php passes control to b.php
> - output is being cleared, script b.php renders it from scratch, then
> sends back to the browser
>
> Is it possible (like in ASP.NET lets say - Server.Redirect())?
>
> Many thanks for help!
Well, unless there are fatal errors in a.php, use the output buffering
functions (ob_start() in a.php, ob_end_clean() in b.php).
When there are fatal errors in a.php it's somewhat trickier. You might want
to use set_error_handler() for this one, but be very sure what you're
doing. It will still not be able to catch every error though...
--
Rik Wasmus
[Back to original message]
|