亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Serious problem: Unable to find 'PHPMailer' class
P粉738346380
P粉738346380 2023-08-20 20:15:59
0
1
762
<p><br /></p><ul> <li>I tried:<code>include_once('C:InetpubwwwrootphpPHPMailerPHPMailerAutoload.php');</code></li> </ul> <blockquote> <p>Fatal error: Class 'PHPMailer' not found on line 151 of C:Inetpubwwwrootphpindex.php</p> </blockquote> <p>I placed <code>PHPMailerAutoload.php</code> in the same directory as my script. </p> <p>Can anyone help me resolve this issue? </p>
P粉738346380
P粉738346380

reply all(1)
P粉442576165

All answers are now outdated. Latest versions (as of February 2018) no longer have autoloading, PHPMailer should be initialized as follows:

<?php

  require("/home/site/libs/PHPMailer-master/src/PHPMailer.php");
  require("/home/site/libs/PHPMailer-master/src/SMTP.php");

    $mail = new PHPMailer\PHPMailer\PHPMailer();
    $mail->IsSMTP(); // 啟用SMTP

    $mail->SMTPDebug = 1; // 調(diào)試:1 = 錯(cuò)誤和消息,2 = 僅消息
    $mail->SMTPAuth = true; // 啟用身份驗(yàn)證
    $mail->SMTPSecure = 'ssl'; // 啟用安全傳輸,Gmail要求
    $mail->Host = "smtp.gmail.com";
    $mail->Port = 465; // 或者587
    $mail->IsHTML(true);
    $mail->Username = "xxxxxx";
    $mail->Password = "xxxx";
    $mail->SetFrom("xxxxxx@xxxxx.com");
    $mail->Subject = "測(cè)試";
    $mail->Body = "你好";
    $mail->AddAddress("xxxxxx@xxxxx.com");

     if(!$mail->Send()) {
        echo "郵件發(fā)送失?。? . $mail->ErrorInfo;
     } else {
        echo "郵件已發(fā)送";
     }
?>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template