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 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog