diff options
author | Josh Hoyt <josh@janrain.com> | 2006-01-07 19:46:06 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-01-07 19:46:06 +0000 |
commit | 3bd85d7c5046bdc47adb8cb5a19124b04595821e (patch) | |
tree | 03c2cef42fa4034e65dc4b9c558c728c5cc71233 /admin/adminutil.php | |
parent | 54e5b39fa5d08c700570654998f1a681bfc51ced (diff) | |
download | php-openid-3bd85d7c5046bdc47adb8cb5a19124b04595821e.zip php-openid-3bd85d7c5046bdc47adb8cb5a19124b04595821e.tar.gz php-openid-3bd85d7c5046bdc47adb8cb5a19124b04595821e.tar.bz2 |
[project @ move typetest into admin, now mathlib, and add support code]
Diffstat (limited to 'admin/adminutil.php')
-rw-r--r-- | admin/adminutil.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/admin/adminutil.php b/admin/adminutil.php new file mode 100644 index 0000000..7389838 --- /dev/null +++ b/admin/adminutil.php @@ -0,0 +1,30 @@ +<?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__))); +} + +?>
\ No newline at end of file |