📜  警告:无法修改标头信息 - 标头已由 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:16.427000             🧑  作者: Mango

代码示例2
Solution:

$msg_email = 'Email enviado com sucesso!';
header('Location: ../login.php?msg_email=' . $msg_email);
$mail->send();

Error - Cannot modify header information - headers already sent by ... :
$mail->send();
$msg_email = 'Email enviado com sucesso!';
header('Location: ../login.php?msg_email=' . $msg_email);