有人好心地为我发布了这段代码,但它只在生成的电子邮件中返回“/table”——有什么想法吗?它需要一个关闭的html标签吗?
$mailHeader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$formcontent ="<table border='1'>";
foreach ($_POST as $field=>$value)
{
$formcontent.="<tr>";
$formcontent .= "<td>$field:</td> <td>$value</td>";
$formcontent.="</tr>";
}
$formcontent .= '<tr><td>User-Agent: </td><td>'.$_SERVER['HTTP_USER_AGENT'].'</td>';
$formcontent ="</table>";