$result = $mail->send($recipient, $headers, $html);
if($result === 1)
{
$report= "1";
header("Location: objednavka.php?reaction=".$report);
//echo("Your message has been sent!");
}
else
{
$report= "2";
header("Location: objednavka.php?reaction=".$report);
//echo("Your message was not sent: " . $result);
}
如果此邮件功能运行到 if 语句,则决定它是否成功。如果我使用 echo() 部分,它会写出您的消息已发送。但是如果我想将用户重定向到另一个页面它不起作用。为什么?如何成功调用标头函数?