Hy guys,我正在学习PHP,我已经在我的机器上下载了XAMPP。我在处理表单时遇到问题。我使用HTML创建了一个表单,并按照教程中的要求将其存储在xampp文件夹中的htdocs中。当我用HTML打开表单时,它工作正常,但是当我点击提交时,它将不起作用。下面的就是提交按下时的输出:PHP提交错误
$comments
We will reply to you at $email.
\n" ?>
这里是我的PHP代码此:
<!DOCTYPE html>
<head>
<title>Form feedback</title>
</head>
<body>
<?php #Script 2.2 - handle_form.php
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$comments = $_REQUEST['comments'];
echo "<p>Thank you, <b>$name</b>,for the following comments:<br /><tt>$comments</tt></p>
<p>We will reply to you at <i>$email</i>.</p>\n"
?>
</body>
</html>
PHP没有被解析。 –
我应该如何解决这个问题?我已经把<?php放在开头,并且在最后放置了<>。我没有忘记这一点。 –