phpemail邮件发送类失败
来源:1-1 课程简介

慕用8195461
2017-06-28
老师你好 求解一下 phpemail邮件发送按照你的课程一抹一样 但是在我本地环境提示错误
Fatal error: Class 'phpmailer\PHPMailer' not found in F:\phpstudy\WWW\thinkdecorate\extend\phpmailer\Email.php on line 18 [1] ErrorException in Email.php line 18 Class 'phpmailer\PHPMailer' not found
18行代码如下: $mail = new PHPMailer; <?php namespace phpmailer; use think\Exception; class Email{ /** * @param $to * @param $title * @param $content * @return bool */ public static function send($to,$title,$content){ date_default_timezone_set('PRC');//set time try { //Create a new PHPMailer instance //$mail = new \extend\phpmailer\PHPMailer(); $mail = new PHPMailer; //Tell PHPMailer to use SMTP $mail->isSMTP();
其他地方一样的 求老师帮忙 谢谢
1回答
-
你好注意文件名和类名的大小写保持一致
022018-08-02
相似问题