邮件表格未以UTF8编码到达

时间:2019-02-26 19:20:22

标签: php forms

邮件已到达,但未经过utf8编码,因此有时看起来像这样: Ãœ¼Ã„ äÖöÖp

我是php和编码的新手,所以如果有人可以提供帮助-请!我不知道在哪里定义UTF-8

<?php

$recipient = "info@test.de";
$fmtResponse= implode("", file("response.php"));
$fmtMail= implode("", file("mail.htt"));
foreach($_POST as $key=> $val) {
$fmtResponse= str_replace("<$key>", $val, $fmtResponse);
$fmtMail= str_replace("<$key>", $val, $fmtMail);
}
if ($_POST["access"] == "irregeheim") {
mail($recipient, $_POST["subject"], $fmtMail);
}
echo $fmtResponse;
?>

0 个答案:

没有答案