【发布时间】:2016-01-19 13:10:06
【问题描述】:
我在网上找到了如何执行此操作的说明,但它对我不起作用...我缩短的 PHP 消息是:
$msg = '<html><body>';
$msg .= 'Dear' .$firstname. 'Best wishes';
$msg .= '</body></html>';
我打算在消息中添加一些 html,但这只是出现:
<html><body>
Dear Sam Best wishes
</body></html>
我错过了什么?!谢谢。
【问题讨论】:
-
检查您的
Content-type标头 -
好吧,我看你想通了
-
$headers = '内容类型:文本/html;字符集=iso-8859-1' ;添加标题内容类型 = text/html