* Thus wrote myhan ([EMAIL PROTECTED]):
>
> I ust imap_fetchstructure function to get the structure of a message, and I
> want to push the errors into an array.
> I give a wrong message number and expect cause an imap error, which can be
> get by using imap_errors().
> But it does not work like that. I get nothing from imap_errors(), and the
> browser print a waring like that :
>
> Warning: imap_fetchstructure(): Bad message number in
> e:\testroot\imap\index.php on line 52
>
> What can I do?
You can psudo trap the error message, if you have the php.ini
setting 'track_errors' on then you can do something like:
if (! @imap_fetchstructure(...) ) {
array_push($errors, $php_errormsg);
}
The @ suppresses direct output to the browser. and php_errormsg
contains the string that woulda been sent.
HTH,
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php