未捕获异常';异常';带有消息';*GET属性登录不存在';谁能给我解决办法吗


Uncaught exception 'Exception' with message ' * GET Property login does not exist' can any one give me the solution

我收到这个错误

致命错误:

未捕获异常"exception",消息为"*GET属性登录"中不存在E: ''examplep''htdocs''UniversityWork''Project''UniversityProjectPHP''model''Checkout.php:30堆栈跟踪:#0E: ''examplep''htdocs''UniversityWork''Project''UniversityProjectPHP''views''top.php(44):结账->__get('登录')#1

E: ''examplep''htdocs''UniversityWork''Project''UniversityProjectPHP''checkout.php(9):require_one('E:''examplep''htdocs…')抛出#2{main}E: ''examplep''htdocs''UniversityWork''Project''UniversityProjectPHP''model''Checkout.php在线30

第44行看起来像这个

if ($obj_user->login && in_array($current, $public_pages)) {
$_SESSION['ref_url'] = $url;
$_SESSION['msg'] = "You must <a href='" . BASE_URL .    "process/process_logout.php'>LOGOUT</a> to view this page";
header("Location:" . BASE_URL . "msg.php");
}

第30行看起来像

public function __get($name) {
    $method_name = "get_$name";
    if (!method_exists($this, $method_name)) {
        **throw new Exception(" * GET Property $name does not exist");**
    }
    return $this->$method_name();
}

第9行看起来像这个

<title> Home shop || Checkout </title>
<?php
require_once 'model/user.php';
require_once 'model/brand.php';
require_once 'model/Checkout.php';
require_once 'model/product.php';
require_once 'model/cart.php';
require_once 'model/category.php';
**require_once 'views/top.php';**
require_once 'model/web_interface.php';
?>

这部分代码:

if ($obj_user->login

正在尝试读取$obj_user对象的属性login,但它没有get_login属性读取访问器。

从你发布的信息来看,我不能说更多。