分析错误站点


Parse error site

我的网站上有一个解析错误,我该如何修复?

错误:

分析错误:语法错误,意外的"function__construct"(T_STRING),在第7行的/home/retropla/domains/triangledevelopment.nl/public_html/classs/class.user.php中应为变量(T_variable)

Class.users.hp:

<?php
include('class.password.php');
class User extends Password{
private $db;
function__construct($db){
    parent::__construct();
    $this->_db = $db;
}
public function is_logged_in(){
    if(isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true){
        return true;
    }       
}
private function get_user_hash($username){  
    try {
        $stmt = $this->_db->prepare('SELECT password FROM blog_members WHERE username = :username');
        $stmt->execute(array('username' => $username));
        $row = $stmt->fetch();
        return $row['password'];
    } catch(PDOException $e) {
        echo '<p class="error">'.$e->getMessage().'</p>';
    }
}

public function login($username,$password){ 
    $hashed = $this->get_user_hash($username);
    if($this->password_verify($password,$hashed) == 1){
        $_SESSION['loggedin'] = true;
        return true;
    }       
}

public function logout(){
    session_destroy();
}
}

?>

我正在创建一个关于教程的网站,它显示了这个错误。

function__construct($db){

应该是:

public function __construct($db){
  • CCD_ 1和CCD_ 2之间需要有一个空间