- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
function connect( $db_user, $db_pass, $db_name, $db_location )
{
$db_location = explode( ":", $db_location );
if ( isset( $db_location[1] ) ) {
$this->db_object = @mysqli_connect( $db_location[0], $db_user, $db_pass, $db_name, $db_location[1] );
}
else {
$this->db_object = @mysqli_connect( $db_location[0], $db_user, $db_pass, $db_name );
}
if ( ! $this->db_object ) {
$this->display_error( mysqli_connect_error( ), '1' );
}
$this->mysql_version = mysqli_get_server_info( $this->db_object );
mysqli_query( $this->db_object, "SET NAMES '" . COLLATE . "'" );
mysqli_set_charset( $this->db_object, "utf8" );
return true;
}