嘿你们我有这段代码在这里,我想要做的是包括什么是在这个HTML文件到电子邮件,但它似乎没有工作:(是MIME类型好吗?是php包括不是我期待的?包括一个电子邮件中的PHP文件
$to = "[email protected]";
$subject = "Late Notice";
$message .= include("latenotice.html");
$from = "[email protected]";
$headers = "From:" . $from;
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
mail($to,$subject,$message,$headers);
Include打开并评估一个文件。你可能想要类似fopen()的东西。 – j08691 2012-04-20 18:32:12
@ j08691:file_get_contents要容易得多。 – 2012-04-20 18:33:19