Error establishing a database connection

Hi! I got this mysql error : “Connection timed out” while page loading.
This is my DB class:
class Database
{
public $conn;
const DB_SERVER = “sql313.epizy.com”;
const DB_USER = “MY USERNAME”;
const DB_PASSWORD = “MY PASSWORD”;
const DB_NAME = “MY DB NAME”;

function __construct()
{
	$this->conn = new mysqli(DB_SERVER,DB_USER,DB_PASSWORD,DB_NAME);
	if($this->conn->connect_error) {
		die('Errore: '.$this->conn->connect_error);
	}
}

}
I checked much times for Username, Password, Database name and database host.
Sorry for my bad English :3

I solved declaring constants outside of class.
define(DB_HOST, “sql313.epizy.com”);
define(DB_USER, “MY USERNAME”);
define(DB_PASS, “MY PASSWORD”);
define(DB_NAME, “MY DB NAME”);
class Database
{
public $conn;

function __construct()
{
	$this->conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
	if($this->conn->connect_error) {
		die('Errore: '.$this->conn->connect_error);
	}
}

}

I think the first line of the constructor should be like this:

$this->conn = new mysqli(self::DB_HOST, self::DB_USER, self::DB_PASS, self::DB_NAME);

Using self ensure you’re using the constants defined in the local class. Without using self, you’re trying to access global constants (which are set using the define function).