在第11行少 { 了<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>发送邮件</title>
</head>
<body>
<?php 
    echo "wangyan";
    if($from=="") $from="wu ming:";
    $headers="From:".$from."\n";
if(mail($to,$subject,$text)){
echo "chenggong";
else echo "shi bai";
}
?></body>
</html>