On Wed, 2002-03-13 at 11:06, Malte H�bner wrote:
> Hi!
>
> I've got a little Problem with my ErrorHandler.
>
> set_error_handler('ErrorHandler'); is executed on top of my script. Right
> after it the ErrorHandler function.
>
> After the ErrorHandler function there is a require('foo.php');
>
> foo.php does not exist, so there should be an error message thrown out from
> my ErrorHandler - but the error message which i get is the standard-php
> error message.
>
> My ErrorHandler function works really fine and i only get the php-standard
> error from not existing includes or requires.
> Does anyone know how to solve this?
>
> error_reporting is set to 2039 in php.ini
>
> Thanks for helping!
>
> malte
>From the manual (http://www.php.net/manual/en/function.require.php):
require() and include() are identical in every way except how they
handle failure. include() produces a Warning while require() results
in a Fatal Error. In other words, don't hesitate to use require() if
you want a missing file to halt processing of the page. include() does
not behave this way, the script will continue regardless. Be sure to
have an appropriate include_path setting as well.
And since you can't catch Fatal errors, you can't do this. If you want
to prevent the script from displaying this error, set display_errors =
Off. If you want the script to not halt there, use include.
Hope this helps,
Torben
--
Torben Wilson <[EMAIL PROTECTED]>
http://www.thebuttlesschaps.com
http://www.hybrid17.com
http://www.inflatableeye.com
+1.604.709.0506
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php