我正在用 PHP 编码,然后弹出这个奇怪的错误。
if(isset($_GET["failauth"])){ ?>
<div>Sorry, your user name or password is not correct. Please re-enter. </div>
<form id="loginform" action="login.php" method="post">
<?php }
else if(isset($_GET("usernotexist"))){ ?>
<div>Sorry, the username is not found</div>
<form id="signupform" action="login.php?signup=true" method="get">
<?php }
else { ?>
<form id="loginform" action="login.php" method="post">
<?php } ?>
<div><input name="name" type="text" size="8" autofocus="autofocus" pattern="/^.{3,8}$/" /> <strong>User Name</strong></div>
<div><input name="password" type="password" size="8" pattern="/^[0-9].{4,10}[^a-zA-Z0-9]$/" /> <strong>Password</strong></div>
<div><input type="submit" value="Log in" /></div>
</form>
第 36 行引用“else if”语句。我很好奇为什么它通过了第一个但没有通过 else if 部分?是否与语法有关,因为我之前从未使用过 else if 语句...