|
|
@@ -1,54 +0,0 @@
|
|
|
-<?php
|
|
|
-
|
|
|
-namespace app\common\library;
|
|
|
-
|
|
|
-use Psr\Log\AbstractLogger;
|
|
|
-use think\Hook;
|
|
|
-
|
|
|
-/**
|
|
|
- * Oss文件上传
|
|
|
- */
|
|
|
-class Oss extends AbstractLogger
|
|
|
-{
|
|
|
-
|
|
|
- /**
|
|
|
- * phpmailer对象
|
|
|
- */
|
|
|
- protected $mail = null;
|
|
|
-
|
|
|
- /**
|
|
|
- * 错误内容
|
|
|
- */
|
|
|
- protected $error = '';
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 构造函数
|
|
|
- * @param array $options
|
|
|
- */
|
|
|
- public function __construct($options = [])
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
- //设置发件人
|
|
|
- $this->from($this->options['mail_from'], $this->options['mail_smtp_user']);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * Logs with an arbitrary level.
|
|
|
- *
|
|
|
- * @param mixed $level
|
|
|
- * @param string $message
|
|
|
- * @param array $context
|
|
|
- *
|
|
|
- * @return void
|
|
|
- *
|
|
|
- * @throws \Psr\Log\InvalidArgumentException
|
|
|
- */
|
|
|
- public function Init($level, $message, array $context = array())
|
|
|
- {
|
|
|
- \think\Log::write($message);
|
|
|
- }
|
|
|
-}
|