Suppress bogus PHP imap_open() Notice: insecure server advertised AUTH=PLAIN

前端 未结 3 1529
攒了一身酷
攒了一身酷 2021-01-04 13:59

I\'m getting a mess of these bogus warnings in my log file, and I’d like to suppress them without suppressing legitimate messages:

PHP Notice: Unknown: SECU

3条回答
  •  我在风中等你
    2021-01-04 14:15

    One thing you can do is use the imap_errors and imap_alerts functions, place this code before your imap_close.

    imap_errors();
    imap_alerts();
    

    What these functions do is return all errors and alerts that have occured and then flushes them. If you do not call these functions they are issued as notices when imap_close() is called, or the page dies.

提交回复
热议问题