There was an error when submitting data through phpmailer in Thinkphp and sending the data to the mailbox.
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-16 12:59:30
0
6
545

My "PHPMailer" folder is placed in the Vendor in the Library inside the Thinkphp framework.
The browser error is:

But when the cursor is positioned at the call point of the SendMail function, press ctrl left-click, and the function can be positioned at the function definition point.

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(6)
黄舟

vendor('PHPMailer/class.phpmailer');

我想大声告诉你

vendor('file entry name');

黄舟
require_once($_SERVER['DOCUMENT_ROOT']."/PHPMailer/class.phpmailer.php")

Try quoting like this (the path must be written completely)

过去多啦不再A梦

Is it tp3?
The error you reported means that the class was not instantiated.

Vendor('PHPMailer.PHPMailerAutoload');
$mail = new PHPMailer(); //实例化
$mail->sendmail(...);
世界只因有你

Vendor('PHPMailer.PHPMailerAutoload');
$mail = new PHPMailer(); //Instantiation

世界只因有你

The problem is that the sendmailer function is written in the function.php file and cannot be written in the common.php file. This way you can call it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template