[英]Login page shows blank
我當前正在修復的項目的登錄頁面顯示為空白。 我試圖回聲一些話,以找出錯誤所在。 我發現注釋掉下面的代碼即可顯示它。
elseif( isset($_POST['do_login'] ) ){ //Login user
$email = (isset($_POST['login']) && is_string($_POST['login'])
&& strlen($_POST['login'])<100)?$_POST['login'] : null;
$password = (isset($_POST['password']) && is_string($_POST['password'])
&& strlen($_POST['password'])<100)?$_POST['password'] : null;
$remember = isset($_POST['chkremember']) ? true : false;
$result = $auth->login($email, $password, $remember);
switch($result){
case 1:
$msg = 'You have successfully logged in.'
break;
case 2:
$msg = 'Your account has not yet been confirmed. <br/> Please check the e-mail message sent by us and click the confirmation code to validate this account. <a href="user_login.php?view=resend&resend_email='.$email.'">resend activation e-mail</a>';
break;
case 3:
$msg = 'Your account is not enabled!';
break;
case 4:
$msg = 'Account with given login credentials does not exist!';
break;
}
}
誰能幫我弄清楚這段代碼有什么問題嗎?
case 1
,您錯過了;
break
前。
case 1: $msg = 'You have successfully logged in.' break;
分號在中斷前丟失;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.