Help me, I want to embed an image with PHP Mailer version 5.1.. and my PHP version is 5.4.7
帮帮我,我想用PHP Mailer 5.1版嵌入一个图像..我的PHP版本是5.4.7
The script execution is a success, and I can receive emails with embedded images, but the problem is warnings appear like this:
脚本执行成功,我可以接收包含嵌入图像的电子邮件,但问题是警告显示如下:
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\form\class.phpmailer.php on line 1480
不推荐使用:函数set_magic_quotes_runtime()在第1480行的C:\ xampp \ htdocs \ form \ class.phpmailer.php中弃用
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\form\class.phpmailer.php on line 1484
不推荐使用:函数set_magic_quotes_runtime()在第1484行的C:\ xampp \ htdocs \ form \ class.phpmailer.php中已弃用
and my script is is
我的剧本是
$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' />.";
3 个解决方案
#1
-5
add these code into the top of your script
将这些代码添加到脚本的顶部
@set_magic_quotes_runtime(false);
ini_set('magic_quotes_runtime', 0);
#2
4
It's because magic_quotes_runtime functions are deprecated starting from 5.3 PHP version, but 5.1 version of PHPmailer still uses them. Try to upgrade to PHPmailer 5.2, the problem should be solved, more info here: http://code.google.com/a/apache-extras.org/p/phpmailer/source/detail?r=66
这是因为从PHP PHP版本开始不推荐使用magic_quotes_runtime函数,但PHP版本的PHP版本仍然使用它们。尝试升级到PHPmailer 5.2,问题应该解决,更多信息请访问:http://code.google.com/a/apache-extras.org/p/phpmailer/source/detail?r = 66
#3
0
The developers of the software often make updates. You can install their newest version, and it shall be without this warning.
该软件的开发人员经常进行更新。你可以安装他们的最新版本,它应该没有这个警告。
#1
-5
add these code into the top of your script
将这些代码添加到脚本的顶部
@set_magic_quotes_runtime(false);
ini_set('magic_quotes_runtime', 0);
#2
4
It's because magic_quotes_runtime functions are deprecated starting from 5.3 PHP version, but 5.1 version of PHPmailer still uses them. Try to upgrade to PHPmailer 5.2, the problem should be solved, more info here: http://code.google.com/a/apache-extras.org/p/phpmailer/source/detail?r=66
这是因为从PHP PHP版本开始不推荐使用magic_quotes_runtime函数,但PHP版本的PHP版本仍然使用它们。尝试升级到PHPmailer 5.2,问题应该解决,更多信息请访问:http://code.google.com/a/apache-extras.org/p/phpmailer/source/detail?r = 66
#3
0
The developers of the software often make updates. You can install their newest version, and it shall be without this warning.
该软件的开发人员经常进行更新。你可以安装他们的最新版本,它应该没有这个警告。