表单操作目标PHP文件被下载而不是被解析

时间:2014-02-09 19:39:53

标签: php forms

表单操作中引用的PHP文件被下载而不是解析!以下是激活事件的代码:

<form method="post" action="./php/signup.php">

这是PHP文件:

$username = $_POST["username"];
$first = $_POST["first"];
$last = $_POST["last"];
$passworda = $_POST["passworda"];
$passwordb = $_POST["passwordb"];
$emaila = $_POST["emaila"];
$emailb = $_POST["emailb"];
if ($passworda != $passwordb) {
        echo "Passwords do not match!";
} else {
        echo "Password Check Complete!";
}
if ($emaila != $emailb) {
        echo "E-Mails do not match";
} else {
        echo "E-Mail Check Complete!";
}

可能出现什么问题?

1 个答案:

答案 0 :(得分:0)

@dognose是的,我错过了<?php?>。谢谢!