diff --git a/service/Application/Home/Controller/CommonController.class.php b/service/Application/Home/Controller/CommonController.class.php index ae88b2040..66f1cbf27 100755 --- a/service/Application/Home/Controller/CommonController.class.php +++ b/service/Application/Home/Controller/CommonController.class.php @@ -86,6 +86,10 @@ class CommonController extends Controller { $result['msg'] = L('common_operation_error'); } + ob_start(); +//清除缓冲区中的内容 +ob_clean(); + exit(json_encode($result)); } diff --git a/service/Application/Library/Email.class.php b/service/Application/Library/Email.class.php index 7fe4c67f0..99c41fb78 100755 --- a/service/Application/Library/Email.class.php +++ b/service/Application/Library/Email.class.php @@ -137,21 +137,17 @@ class Email // 邮件正文不支持HTML的备用显示 $this->obj->AltBody = strip_tags($param['content']); - try { - // 发送邮件 - if($this->obj->Send()) + // 发送邮件 + if($this->obj->Send()) + { + // 是否存在验证码 + if(!empty($param['code'])) { - // 是否存在验证码 - if(!empty($param['code'])) - { - $this->KindofSession($param['code']); - } - return true; - } else { - $this->error = $this->obj->ErrorInfo; + $this->KindofSession($param['code']); } - } catch(Exception $e) { - $this->error = $e->getMessage(); + return true; + } else { + $this->error = $this->obj->ErrorInfo; } return false; }