4 * The Main lib.php file.
10 // get the lib root, and set include path from it
11 $LIB_ROOT_FS = realpath(dirname(__FILE__));
15 * I shouldnt ever need to do this bit, but its here, just in case
16 $adpath = realpath($LIB_ROOT_FS."/../");
17 error_log("added libglcas path as $adpath");
18 set_include_path(get_include_path().PATH_SEPARATOR.$adpath);
21 require_once("libglcas/urlparser.php");
22 require_once("libglcas/web.php");
23 require_once("libglcas/config.php");
25 function glcas_pluginLoader($path="")
30 $plpath = realpath($LIB_ROOT_FS."/../plugins/");
31 if(file_exists($plpath."/glcas_plugin.php")) {
32 // here it is, load away
33 error_log("attempting to load plugins from $plpath");
34 $dh = opendir("$plpath");
36 while(($file = readdir($dh))!==false) {
37 $mt = preg_match("/.*.php$/", $file);
39 error_log("loading plugin $file");
40 require_once("$plpath/$file");
41 //echo "required $basedir/$file\n";