i have a class:
class Connect
{
public function auth()
{
... do something
}
}
and i have a function: getfile.php
<?php
require_once($GLOBALS['path']."connect.php");
?>
the i have the: connect.php
<?php
function connect( $host, $database )
{
database connection here
}
?>
how can i use this functions inside my class like this:
class Connect
{
require_once("getfile.php");
public function auth()
{
connect( $host, $database )
... do query
}
}
is this possible?
thanks