drh96824 2012-02-27 10:46
浏览 76
已采纳

PHP如何设置位掩码参数。 imap_fetchbody将'='添加到字符串中

I'm using some PHP imap_functions to automatically process emails.

However the emails have to stay in HTML format and the function imap_fetchbody seems to add '=' as the end of some lines meaning my html parser cannot parse it correctly.

I think it is because FT_INTERNAL needs setting but whatever I try it still does the same.

How do I add a bitmask set of parameters or stop the function from doing this.

$content .= imap_fetchbody($inbox, $email_number, "1", FT_UID & FT_PEEK & FT_INTERNAL);
$content .= imap_fetchbody($inbox, $email_number, "1", 124); 
  • 写回答

1条回答 默认 最新

  • douli4337 2012-02-27 10:55
    关注

    Not a great solution, but it works fine for me:

    
    $body = preg_replace("/=(?)
    /", '', imap_fetchbody($mailbox, $message, $part));
    
    

    Hope it helps in some way

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了