我在下面的代码下运行时遇到错误,请帮助我
public function storeUser($name, $email, $password, $phone,$stream) {
$response = array();
$uuid = uniqid('', true);
$hash = $this->hashSSHA($password);
$encrypted_password = $hash["encrypted"]; // encrypted password
$salt = $hash["salt"]; // salt
if (!$this->isUserExisted($email)) {
$stmt = $this->conn->prepare("INSERT INTO users(unique_id, name, email, encrypted_password, phone,stream, salt, created_at) VALUES('$uuid','$name','$email',$'$encrypted_password','$phone','$stream','$salt',NOW())");
$stmt->bind_param("isssisss", $uuid,$name,$email,$encrypted_password,$phone,$stream,$salt,NOW());
$result = $stmt->execute();
$stmt->close();
if ($result) {
// User successfully inserted
$response["error"] = false;
$response["user"] = $this->getUserByEmailAndPassword($email);
}else {
$response["error"] = true;
$response["message"] = "Oops! An error occurred while registereing";
}
} else {
$response["error"] = false;
$response["user"] = $this->getUserByEmailAndPassword($email);
}
return $response;
}
错误是
PHP 致命错误:在第 98 行的 /var/www/html/android_login_api_test/include/DB_Functions.php 中的非对象上调用成员函数 bind_param()