我对注册功能有问题,该功能在XAMP上有效,但不适用于我的Web服务器。但是问题是我的Web服务器甚至在else部分中都没有显示错误。
$stmt = $this->conn->prepare("INSERT INTO users(ID, email, password, salt, credits, total_credits) VALUES(?, ?, ?, ?, ?, ?)");
$stmt->bind_param("ssssss", $uuid, $email, $encrypted_password, $salt, $credits, $total_credits);
$result = $stmt->execute();
$stmt->close();
// check for successful store
if ($result) {
$stmt = $this->conn->prepare("SELECT * FROM users WHERE email = ?");
$stmt->bind_param("s", $email);
$stmt->execute();
$user = $stmt->get_result()->fetch_assoc();
$stmt->close();
return $user;
} else {
die($stmt -> error);
}
非常感谢您
答案 0 :(得分:0)
由于您已经关闭$stmt
尝试使用
die($this->conn -> error);
答案 1 :(得分:0)
证明close()方法有效。
谢谢大家:)