File: adminutil.php

package info (click to toggle)
php-openid 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,284 kB
  • ctags: 6,733
  • sloc: php: 20,482; python: 346; xml: 333; sh: 130; perl: 103; makefile: 31
file content (30 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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__)));
}

?>