0
我有两个文件,testpage.html和testpage.php在同一个文件夹中。HTML PHP表单文章显示空白?
这是testpage.html
<!DOCTYPE HTML>
<html>
<body>
<form action="testpage.php" method="post">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>
</body>
</html>
这是testpage.php
<html>
<body>
Welcome <?php echo $_POST["name"]; ?><br>
Your email address is: <?php echo $_POST["email"]; ?><br>
</body>
</html>
形式似乎工作不错,但我击球的时候提交什么也不显示的下一个页面上。不管我输入的内容是什么,它总是显示“欢迎”,“你的电子邮件地址是:”,之后没有任何内容输入,就像它应该的那样。
我有什么配置不正确吗?我使用了错误的浏览器(firefox)吗?
谢谢!
当您查看页面源时,您看到了什么? – David
*“我使用了错误的浏览器(firefox)吗?”* - 闻起来像'file:/// C:/ file.xxx'而不是主机。 –
可能重复http://stackoverflow.com/questions/5121495/php-code-is-not-being-executed-i-can-see-it-on-source-code-of-page –