From 0fe4e8a8dbb339837d31d9434ff5e2ae6f76ce1c Mon Sep 17 00:00:00 2001 From: HFO4 <912394456@qq.com> Date: Sat, 24 Mar 2018 22:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E6=B5=8B=E8=AF=95=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E8=BF=94=E5=9B=9E=E6=9B=B4=E5=A4=9ADebug=E4=BF=A1?= =?UTF-8?q?=E6=81=AF(Fix=20#46)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/WebDav.php | 2 +- application/index/model/Mail.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/index/controller/WebDav.php b/application/index/controller/WebDav.php index ffdd15ea..7d8ca31d 100644 --- a/application/index/controller/WebDav.php +++ b/application/index/controller/WebDav.php @@ -28,7 +28,7 @@ class WebDav extends Controller{ $publicDir = new Directory($this->uid."/"); $server = new DAV\Server($publicDir); - $server->setBaseUri('/WebDav/Api/uid/'.$this->uid); + $server->setBaseUri('/WebDav/Api/uid/'.$this->uid."/"); $lockBackend = new DAV\Locks\Backend\File(ROOT_PATH.'public/locks'); $lockPlugin = new DAV\Locks\Plugin($lockBackend); $server->addPlugin($lockPlugin); diff --git a/application/index/model/Mail.php b/application/index/model/Mail.php index c7eb4dca..07f131c5 100644 --- a/application/index/model/Mail.php +++ b/application/index/model/Mail.php @@ -45,13 +45,16 @@ class Mail extends Model{ $mail->Username =$this->smtpUser; $mail->Password = $this->smtpPass; $mail->From = $this->fromAdress; + $mail->SMTPDebug = 1; + $mail->Debugoutput = function($str, $level) { + $this->errorMsg .= $str; + }; $mail->isHTML(true); $mail->addAddress($to,$name); $mail->Subject = $title; $mail->Body = $content; $status = $mail->send(); if(!$status){ - $this->errorMsg = $mail->ErrorInfo; return false; } return true;