// +---------------------------------------------------------------------- namespace think\log\alarm; /** * 邮件通知驱动 */ class Email { protected $config = [ 'address' => '', ]; // 实例化并传入参数 public function __construct($config = []) { $this->config = array_merge($this->config, $config); } /** * 通知发送接口 * @access public * @param string $msg 日志信息 * @return bool */ public function send($msg = '') { return error_log($msg, 1, $this->config['address']); } }