首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >PHP脚本分析错误意外的'}‘在第11行

PHP脚本分析错误意外的'}‘在第11行
EN

Stack Overflow用户
提问于 2018-07-05 08:03:30
回答 1查看 170关注 0票数 -2

我是一个新的php程序员,所以我很难捕捉到错误。如果有人能解释一下这个错误,那将对我有很大帮助。

当在几个在线调试器中运行我的php时,我继续得到错误消息:

分析错误:语法错误,第11行出现意外的'exit‘(T_EXIT)

然而,我不相信这是真的。有谁能帮帮我吗?

    <?php 

if (isset($_POST['submit'])) {
    include_once 'dbh.inc.php';


    $uid = $_POST['uid'];
    $pwd = $_POST['pwd'];

    if (empty($uid) || empty($pwd)) {
        header("Location: ../index.php")
        exit()
    } else {
        $sql = "SELECT * FROM users WHERE user_uid ='$uid'"; 
        $result= mysqli_query($conn, $sql);
        $resultcheck = mysqli_num_rows($result);
        if ($resultcheck < 1) {
            header("Location: ../index.php")
            exit()
        } else {
            if ($row = mysqli_fetch_assoc($result)) {
                $hashedPwdCheck = password_verify($pwd, $row['user_pwd']);
                if ($hashedPwdCheck == false) {
                    header("Location: ../index.php")
                    exit()
                } elseif($hashedPwdCheck == true) {
                    $_SESSION['u_id'] = $row['user_id'];
                    $_SESSION['u_first'] = $row['user_first'];
                    $_SESSION['u_last'] = $row['user_last'];
                    $_SESSION['u_email'] = $row['user_email'];
                    $_SESSION['u_uid'] = $row['user_uid'];
                    echo "Correct";
                }
            }
        }
    }



} else { 
    header("Location: ../index.php?login=error")
    exit()

}

 ?> 
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51181920

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档