我有一个文件夹名称php在我的桌面上包含文件名index.html,我已经在我的C:// xampp文件夹中安装xampp .Plz告诉我如何构建php文件夹 index.html包含此代码。但此代码不发送电子邮件。在我的文件夹结构中有任何问题phpPHP邮件没有发送为什么?
<!Doctype html>
<html>
<head>
<title>My email Page</title>
</head>
<body>
<div>
<?php
$email = "[email protected]";
$subject = "hope this works";
$body = "i think all is well";
$header = "from [email protected]";
mail($email , $subject, $body $header);
echo "ok all well";
?>
</div>
</body>
</html>
仔细检查您的邮件() – Rhopercy
您必须了解html和php的区别。它不是一样的,PHP必须由你的http服务器专门处理。请在网上搜索一些关于php的基本介绍。 Ther很丰富,并且在这里复制所有内容是毫无意义的。 – arkascha
你是否设置了php.ini文件。如果没有,请通过 –