Reply to Re: One script passing control to the other?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация