Undefined Variable global conn | php [duplicate]

Hi I have class that this codes :

$conn = mysqli_connect($host,$username,$password,$dbname);

And I need call $conn that function in users.php ; code :

include("db.php");

function getUsers()
{
    $sql = "...";

    global $re;

    $re = mysqli_query($conn ,$sql);
}

My Error :

Undefined Variable: conn in users.php