douzi2333 2012-10-29 08:11
浏览 110
已采纳

函数set_magic_quotes_runtime()在phpmailer中已弃用

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 &nbsp; ". $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条回答 默认 最新

  • doupang1917 2013-06-08 06:42
    关注

    add these code into the top of your script

    @set_magic_quotes_runtime(false);
    ini_set('magic_quotes_runtime', 0);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程