用户.php(模型):
...
public function hashPassword($password){
$hashed = hash('sha256', $password . self::HASH_CODE);
return $hashed;
}
...
用户身份.php
...
else if($user->password!==Users::hashPassword($this->password))
...
错误:
Non-static method Users::hashPassword() should not be called statically, assuming $this from incompatible context