Skip to content

Instantly share code, notes, and snippets.

@atinypixel
Created December 24, 2010 20:32
Show Gist options
  • Select an option

  • Save atinypixel/754491 to your computer and use it in GitHub Desktop.

Select an option

Save atinypixel/754491 to your computer and use it in GitHub Desktop.
Function for building paths
function get_path($wildcard="", $remote=false) {
$path = $remote ? "http://".$_SERVER['HTTP_HOST'] : $_SERVER['DOCUMENT_ROOT'];
if($wildcard != "")
$path .= "/".$wildcard."/";
return $path;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment