3 // i am the main library
7 * The Main lib.php file.
13 // get the lib root, and set include path from it
14 $LIB_ROOT_FS = realpath(dirname(__FILE__));
18 * I shouldnt ever need to do this bit, but its here, just in case
19 $adpath = realpath($LIB_ROOT_FS."/../");
20 error_log("added libglcas path as $adpath");
21 set_include_path(get_include_path().PATH_SEPARATOR.$adpath);
26 require_once("libanyhammer/web.php");
27 require_once("libanyhammer/config.php");
29 function ah_pluginLoader($path="")
34 $plpath = realpath($LIB_ROOT_FS."/../plugins/");
35 if(file_exists($plpath."/ah_plugin.php")) {
36 // here it is, load away
37 error_log("attempting to load plugins from $plpath");
38 $dh = opendir("$plpath");
40 while(($file = readdir($dh))!==false) {
41 $mt = preg_match("/.*.php$/", $file);
43 error_log("loading plugin $file");
44 require_once("$plpath/$file");
45 //echo "required $basedir/$file\n";