我正在为管理员登录工作,请任何人解决这个问题..
Email: <?php echo $admin->get_email(); ?>
Fatal error: Call to a member function get_row() on a non-object in D:\MyWebSite\business_design\admin\admin-class.php on line 82
编码:
public function get_email() {
$username = $_SESSION['admin_login'];
global $db;
$info = $db->get_row("SELECT `email` FROM `user` WHERE `username` = '" . $db->escape($username) . "'");
if(is_object($info))
return $info->email;
else
return '';
}