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 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题