函数set_magic_quotes_runtime()在phpmailer中不推荐使用 [英] Function set_magic_quotes_runtime() is deprecated in phpmailer
问题描述
帮帮我,我想用PHP Mailer 5.1版来嵌入图片,而我的PHP版本是5.4.7
脚本执行成功,我可以收到带有嵌入式图像的电子邮件,但问题是警告显示如下:
$ b
不推荐使用:函数set_magic_quotes_runtime()在C: \xampp\htdocs\form\class.phpmailer.php on line 1480
不推荐使用:函数set_magic_quotes_runtime()在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 =感谢您在SGU注册,如需进一步处理,请在注册之前完成注册费用。 $ e ['testschedule']。< br>有关未来信息,请通过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);
Help me, I want to embed an image with PHP Mailer version 5.1.. and my PHP version is 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
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\form\class.phpmailer.php on line 1484
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' />.";
add these code into the top of your script
@set_magic_quotes_runtime(false);
ini_set('magic_quotes_runtime', 0);
这篇关于函数set_magic_quotes_runtime()在phpmailer中不推荐使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!