1 bootstrap.inc backdrop_is_apache()

Checks whether Backdrop is running under Apache.

@since 1.9.2

Return value

bool: TRUE if Backdrop is running under Apache, FALSE if not.

File

core/includes/bootstrap.inc, line 811
Functions that need to be loaded on every Backdrop request.

Code

function backdrop_is_apache() {
  // Test runs always emulate Apache.
  $test_info = &$GLOBALS['backdrop_test_info'];
  if (!empty($test_info['in_child_site'])) {
    return TRUE;
  }

  $server_software = $_SERVER['SERVER_SOFTWARE'];
  return (bool) preg_match("/apache/i", $server_software);
}