国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

使用composer安裝PHPMailer后,總是報錯Error: Class 'phpmailer\phpmailer\PHPMailer' not found

jones

安裝過程正常

composer require phpmailer/phpmailer
Using version ^6.1 for phpmailer/phpmailer
./composer.json has been updated
Running composer update phpmailer/phpmailer
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking phpmailer/phpmailer (v6.1.7)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Downloading phpmailer/phpmailer (v6.1.7)
  - Installing phpmailer/phpmailer (v6.1.7): Extracting archive
3 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
15 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

代碼中:
//引入
use phpmailer\phpmailer\PHPMailer;
//使用
$mail = new PHPMailer(); //這行報錯

4709 1 0
1個回答

xiuwang

https://github.com/PHPMailer/PHPMailer#a-simple-example

use PHPMailer\PHPMailer\PHPMailer;

按照他們文檔是這樣引用吧 。不是use phpmailer\phpmailer\PHPMailer;,你大小寫都不對。

  • 暫無評論
年代過于久遠,無法發(fā)表回答
??