db_is_active

  1. drupal
    1. drupal6 database.inc
    2. drupal7
Versionen
drupal6 – drupal7 db_is_active()

Determine if there is an active connection.

Note that this method will return FALSE if no connection has been established yet, even if one could be.

Rückgabewert

TRUE if there is at least one database connection established, FALSE otherwise.

Verwandte Themen

▾ 3 functions call db_is_active()

drupal_get_filename in includes/bootstrap.inc
Returns and optionally sets the filename for a system item (module, theme, etc.). The filename, whether provided, cached, or retrieved from the database, is only returned if the file exists.
list_themes in includes/theme.inc
Return a list of all currently available themes.
template_preprocess in includes/theme.inc
Adds a default set of helper variables for preprocess functions and templates. This comes in before any other preprocess function which makes it possible to be used in default theme implementations (non-overriden theme functions).

Code

includes/database/database.inc, line 1988

<?php
function db_is_active() {
  return Database::isActiveConnection();
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen