帮助我,我想用PHP Mailer 5.1版嵌入一个图像..我的PHP版本是5.4.7
脚本执行是成功的,我可以接收带有嵌入式图像的电子邮件,但问题是警告显示如下:
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\form\class.phpmailer.php on line 1480
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\form\class.phpmailer.php on line 1484
我的剧本是
$mail->AddEmbeddedImage('filename', 'cid', 'name');
$mail->AddEmbeddedImage('sgu_logo.gif', 'my-pics', 'sgu_logo.gif');
$mail->Body = "Thank you for registering at SGU. For further processing please complete a registration fee before ". $e['testschedule']." <br> For future information please contact us at sgu.ac.id/support <br><br>
<img src='cid:sgu_logo.gif' alt='my-pics' />.";
解决方法:
将这些代码添加到脚本的顶部
@set_magic_quotes_runtime(false);
ini_set('magic_quotes_runtime', 0);