我需要帮助将php输出转换为NON Giberrish。 前端的字符集是utf-8。
这是php代码的联系表格:
<?php
$field_first_name = $_POST['names'];
$field_email = $_POST['email'];
$field_phone = $_POST['phone'];
$field_message = $_POST['message'];
$mail_to = 'guyz@guy-z.info';
$subject = 'הודעה מהאתר: '.$field_first_name;
$body_message = 'מאת: '.$field_first_name."\n";
$body_message .= 'דואר אלקטרוני: '.$field_email."\n";
$body_message .= 'טלפון: '.$field_phone."\n";
$body_message .= ' תוכן ההודעה: '.$field_message;
$headers = 'מאת: '.$field_email."\r\n";
$headers .= 'השב ל: '.$field_email."\r\n";
$mail_status = mail($mail_to, $subject, $body_message, $headers);
if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
//alert('Thank you for the message. We will contact you shortly.');
window.location = 'index.php';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
//alert('Message failed. Please, send an email to gordon@template-help.com');
window.location = 'index.php';
</script>
<?php
}
?>
这是当前的输出:
谢谢!