weixin_33712881 2018-01-30 09:03 采纳率: 0%
浏览 13

标签未解释

I have a problem with my script.

I Insert in my bdd my mails thanks to the Outlook API. To make an Insert I get the source code of my mail then insert it, so far no problem.

After that I make a select to display the mail in another page. My problem is that

the source code is not interpreted

, it shows me all the tags, I don't understand why it doesn't read them.

my echo that displays my emails following the SELECT. My variable $result[body] displays the source code of the email... How do I force it to convert?

 echo nl2br('<!DOCTYPE html>'.'<div class="emailBody">'.'<div class="list-group-item-heading premier">' . $result[from_mail] . '</div>' ."
". '<div class="second">' . $result[recei] .'</div>' ."
". '<div id="post1" class="trois azerty">' . '<p class="azerty bodypreview_1">' . $result[subject]. '</p>'."
".'<div class="demasquer">' .'<p class="body_1">'.$result[body].'</p>'.")".'</div>'.'</div>'. '</div>');

</div>
  • 写回答

1条回答 默认 最新

  • weixin_33726318 2018-02-01 12:12
    关注

    I've been able to help myself thanks to the use of "html_entity_decode". Now my tags are being interpreted. Correction:

    echo  html_entity_decode('<!DOCTYPE html>'  .'<div class="emailBody">'.'<div class="list-group-item-heading premier">' . $result[from_mail] . '</div>' ."
    ". '<div class="second">' . $result[recei] .'</div>' ."
    ". '<div id="post1" class="trois azerty">' . '<p class="azerty bodypreview_1">' . $result[subject]. '</p>'."
    ". '<head>' .'</head>'.'<div class="demasquer">' .'<p class="body_1">'. $result[body] .'</p>'.'</div>'.'</div>'. '</div>');

    </div>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵