Class 'Db' not found

0

I have a php script that I pulled from Github - indieteq

For SQL, but it turns out that when I try to include it in other files, whether with include, require, the files do not recognize the Db class
You can see the php script link My code is this

require('database.class.php');
$connection = new Db("localhost", "db", "root", "");
$id = uniqid();
$username = $_POST["regusername"];
$email = $_POST["regemail"];
$password = password_hash($_POST["regpassword"], PASSWORD_DEFAULT);
$code = sha1(uniqid());
$nametag = rand(); 
$avatar = upload($_FILES["regavatar"]["name"], $id);
$connection->bindMore(array("id"=>$id, "username"=>$username, "email"=>$email, "password"=>$password, "code"=>$code, "nametag"=>$nametag, "avatar"=>$avatar));
$register = $connection->query("INSERT INTO users (id, username, email, password, code, nametag, avatar) values (:id, :username, :email, :password, :code, :nametag, :avatar)");

?>
    
asked by Esteban Fernández 01.07.2018 в 21:12
source

0 answers