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.

8 calls to base_path()
content_public_files_form in modules/content/content.module
This screen lets the user upload/manage/delete "public files" stored at custom/files/content_uploads/public_uploads/
fp_get_module_path in includes/misc.inc
Return the filepath to the module
fp_theme_location in includes/theme.inc
Return the theme location
fp_url in includes/misc.inc
This function will take a path, ex: "admin/config/module" and a query, ex: "nid=5&whatever=yes" And join them together, respecting whether or not clean URL's are enabled.
head.tpl.php in themes/fp6_clean/head.tpl.php
This file is meant to contain all of the common items which should appear in the <head></head> section of the page.

... See full list

File

includes/misc.inc, line 2002
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;
}