2

I'm using the error_log() function like so:

error_log($errorstring, 1, 'myemail@gmail.com');

And it works fine, but every single time it is executed I get exactly 3 copies of the same email spaced about 1 or 2 seconds apart. There is no loop or anything that it's in, this is simply to notify me of a failed login attempt, so it is only called once before it die()s.

Anyone have any bright ideas on this?

EDIT: Sorry forgot to mention, this is in PHP using the error_log() function.

EDIT2: I have switched to using the custom error handler found here:

http://www.tonymarston.net/php-mysql/errorhandler.html

What I have discovered is that while MySQL errors generate only a single email as intended, non-MySQL errors generate the three emails. It's always three... never more or less, and they are spaced anywhere from 0 to 2 seconds apart, based on the timestamp sent in the emails.

Anyone have any other ideas why in the world this would be happening??

4

1 回答 1

0

PHP 手册

error_log($errorstring, 1, 'myemail@gmail.com',string $extra_header);

1消息通过电子邮件发送到目标参数中的地址。这是唯一fourth parameter使用 , extra_headers 的消息类型。

extra_headers

额外的标题。当message_type参数设置为时使用1。此消息类型使用与 mail() 相同的内部函数。

于 2011-10-19T18:33:20.693 回答