php js问题

lianglei9810 lianglei9810 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<?php
$arr['mail_to']="lianglei@help.cn"; //目的地邮箱
$arr['mail_from']="lianglei@help.cn"; //源邮箱
$arr['mail_subject']="subject"; //邮件标题
$arr['mail_body']= "name:".$_POST['txtName']." City:".$_POST['txtCity']."<br />"." Tel:".$_POST['txtTel']." Country:".$_POST['txtCountry']."<br />"." Email:".$_POST['txtEmail']."<br />"." Message:".$_POST['txtMessage']; //邮件正文
$arr['is_html']=True; //是否html邮件,是或否
em_local_send($arr);
echo ' <script language="javascript">';
echo 'alert("Send success.")';
echo 'window.location.href="encontactus.html"';
echo ' </script>';
function em_local_send($arr){
$mail_to = $arr['mail_to'];
$mail_from = $arr['mail_from']=="" ? 'lianglei@help.cn' : $arr['mail_from'];
$mail_subject = $arr['mail_subject'];
$mail_body = $arr['mail_body'];
$is_html = $arr['is_html'];

$header = "";
if ($is_html){
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=UTF-8\r\n";
$header .= "To: $mail_to\r\n";
}
$header .= "From: $mail_from\r\n";
$header .= "Reply-To: $mail_from\r\n";
$header .= "X-Mailer: Heiyeluren-Mailer\r\n";
return mail($mail_to, $mail_subject, $mail_body, $header);
}
?>
echo 'alert("Send success.")'; 这句话 怎么写? 怎么告诉我js 错误 说少;
...全文

相关推荐

评论 1
收藏 已收藏
分享
返回顶部
lianglei9810
基础编程 21,889 成员 140,329 内容