小编Seb*_*ian的帖子

未捕获错误:在初始化之前无法调用页面上的方法; 试图调用方法'bindRemove'

我正在使用jQuery mobile 1.4.5开发一个Web应用程序.

错误:

未捕获错误:在初始化之前无法调用页面上的方法; 试图调用方法'bindRemove'

当我将前端连接到后端(使用PHP连接到数据库)时,我会尝试登录:链接到Web应用程序

如果您没有输入任何内容,您应该会在屏幕上显示错误消息

用户:10001 | 通过:1q2w3e

您还可以注意到它将使您登录,但仅限于刷新页面.通过按下头像退出

如果我禁用jQuery mobile,登录工作正常,我没有收到控制台错误(后端功能就可以了)

我想问题是我调用或初始化某些函数的顺序.我认为最好的方法是在这里发布我的文件.如果您对我们如何帮助彼此更快地解决问题有任何建议,请告诉我.

谢谢^ _ ^

的index.php

<?php 
    ob_start();

    include 'core/init.php'; // Database connection (works)
    include 'includes/header.php'; 

    // Checkes is it is an admin session

    if (logged_in() === true){
        if (is_admin($session_user_id) === true){
            header('Location:admin.php');
            exit();
        }
    }

    include 'includes/footer.php'; 
        ob_end_flush();
?>
Run Code Online (Sandbox Code Playgroud)

header.php文件

<!DOCTYPE html>
<html lang="en">
<?php 

    include 'includes/head.php';

    if  (logged_in() === true)  {
        include 'loggedin.php'; // Landing screen
    }
    else{
        include 'core/widgets/login.php'; // Login screen
    } …
Run Code Online (Sandbox Code Playgroud)

javascript php jquery jquery-mobile

7
推荐指数
0
解决办法
2752
查看次数

标签 统计

javascript ×1

jquery ×1

jquery-mobile ×1

php ×1