drupal_detect_database_types
- Versions
- 5 – 7
drupal_detect_database_types()
Detect all databases supported by Drupal that are compiled into the current PHP installation.
Return value
An array of database types compiled into PHP.
Code
includes/install.inc, line 144
<?php
function drupal_detect_database_types() {
$databases = array();
foreach (array('mysql', 'mysqli', 'pgsql') as $type) {
if (file_exists('./includes/install.'. $type .'.inc')) {
include_once './includes/install.'. $type .'.inc';
$function = $type .'_is_available';
if ($function()) {
$databases[$type] = $type;
}
}
}
return $databases;
}
?>Login or register to post comments 