任何人都知道我为什么会收到以下错误消息?解析错误:语法错误,/ usr/local/4admin/apache/vhosts中的意外T_STRING/
Parse error: syntax error, unexpected T_STRING in /usr/local/4admin/apache/vhosts/abmhd.com/httpdocs/Forms/Email.php on line 11 " Line 11 is " $recipient = "[email protected] "
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$call = $_POST['call'];
$website = $_POST['website'];
$priority = $_POST['priority'];
$type = $_POST['type'];
$message = $_POST['message'];
$formcontent=" From: $name \n Phone: $phone \n Call Back: $call \n Website: $website \n Priority: $priority \n Type: $type \n Message: $message";
$recipient = "[email protected]<script type="text/javascript">
/* <![CDATA[ */
(function(){try{var s,a,i,j,r,c,l,b=document.getElementsByTagName("script");l=b[b.length-1].previousSibling;a=l.getAttribute('data-cfemail');if(a) {s='';r=parseInt(a.substr(0,2),16);for(j=2;a.length-j;j+=2) {c=parseInt(a.substr(j,2),16)^r;s+=String.fromCharCode(c);}s=document.createTextNode(s);l.parentNode.replaceChild(s,l);}}catch(e){}})();
/* ]]> */
</script>";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>`
转义$收件人中的双引号var – Danijel
快速查看你的问题的颜色应该给你一个提示;) –
$ formcontent缺少一个结束报价。 – j08691