> 3) Include and execute capturing critical errors:
> 
> $hf = fopen($incfile, 'r');
> if ($hf) {
>     $buffer = fread($hf, filesize($incfile));
>     fclose($hf);
> }
> if ($buffer) {
>     global $php_errormsg;
>     $php_errormsg = null;
>     @eval($buffer);
>     $err = $php_errormsg;
> }
> 
> The rest goes as above. The "eval" statement will gracefully handle
any
> critical error that would bring your script to an immediate halt in
case
> of
> @include.

How about just using set_error_handler() and process the errors from
there?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to