You are here: Re: exit not working « PHP Programming Language « IT news, forums, messages
Re: exit not working

Posted by Juliette on 08/29/06 23:38

Good Man wrote:
> "Max" <max@kipness.com> wrote in news:1156863358.075644.44180
> @m79g2000cwm.googlegroups.com:
>
>> I've tried exit;, exit();, and die(); all with the same results.
>
> i had similar trouble on a shared hosting server - script continuing when i
> clearly told it to exit.
>
> i think it involves something with either safe_mode being enabled, output
> buffering being enabled, or error_reporting being enabled.
>
> it makes debugging sheer hell. someone else can probably tell you what it
> is specifically, but i encountered this problem last week (on PHP 4 btw).
>
> good luck


Have a look at trigger_error:
http://nl3.php.net/manual/en/function.trigger-error.php


I nowadays use something along the lines of the below if I want a hard
exit (and depending on your error level settings this can be shown to
the user / logged or you can use set_error_handler to specify a totally
different action:

trigger_error('error message', E_USER_ERROR );

 

Navigation:

[Reply to this 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

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