This is constant.php script. As usual I am getting a "Successful or Failed" message for connection. Also it is not outputting any error message. please do tell in the comments).
<?php
define("HOST","localhost");
define("USER","root");
define("PASS","");
define("DB","project_inv");
define("DOMAIN","http://localhost/inv_project/public_html");
?>
This db.php script,after executing script it doesn't show success or failed message.
class Database
{
    private $conn;
    public function connect()
    {
        include_once("constants.php");
        $this->conn = new mysqli(HOST,USER,PASS,DB);
        if ($this->conn) {
         echo "connected";
         // return $this->conn;
        }else{
            return "Database Connection Faild";
        }
    }
}
 
    