function base_path

6.x misc.inc base_path()
4.x misc.inc base_path()
5.x misc.inc base_path()

Shortcut for getting the base_path variable from the global system settings.

14 calls to base_path()

File

includes/misc.inc, line 1299
This file contains misc functions for FlightPath

Code

function base_path() {
  $p = $GLOBALS ["fp_system_settings"]["base_path"];

  // the base_path setting isn't set, so just use '.', meaning, start
  // at the currect directory by default.
  if ($p == "") {
    $p = ".";
  }

  // if our base_path is simply "/" (meaning, we are hosted on a bare domain), then we should
  // actually return nothing, so as not to cause errors with other systems.
  if ($p == "/") {
    $p = "";
  }

  return $p;
}