Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: d4e5efe472
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (26 sloc) 0.614 kB
<?php
/**
* Add a directory to the include path
*
* @param dir: The directory to add to the path
* @param at_start: If true, place this directory at the beginning of
* the include path. Otherwise, place it at the end.
*/
function includeAdd($dir, $at_start=false)
{
$path = ini_get('include_path');
if (strlen($path)) {
$newpath = $at_start ? "$dir:$path" : "$path:$dir";
} else {
$newpath = $dir;
}
ini_set('include_path', $newpath);
}
/**
* Return the parent directory of this module.
*/
function getParent()
{
return dirname(dirname(realpath(__FILE__)));
}
?>
Jump to Line
Something went wrong with that request. Please try again.