Reply to Re: Returning from an included script while inside a function ?

Your name:

Reply:


Posted by Ian Collins on 02/02/06 08:54

joe wrote:
> I have a system where include files puts generated HTML into a variable
> ( $output ).
>
> In one of the pages I have a function that executes SQL queries and
> return nice arrays.
>
> The command to abort an included script is 'return' - but not if you're
> within a function. Then 'return' simply aborts that function.
>
> If the query should fail for some reason, I'd like to overwrite $output
> with a nice err. msg. and then abort execution of the included script
> and return to the main script. But can that be done from within a
> function ?
>
Throw an exception?

--
Ian Collins.

[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

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