示例#1
0
 /**
  * defines all common constants after loading main ini file. 
  * 
  */
 public static function defineCommon()
 {
     $htdocs_path = conf::pathBase() . "/htdocs";
     if (file_exists($htdocs_path)) {
         conf::setMainIni('htdocs_path', self::pathBase() . '/htdocs');
     } else {
         conf::setMainIni('htdocs_path', self::pathBase());
     }
     // module dir
     $mod_dir = self::getMainIni('module_dir');
     if (!$mod_dir) {
         $mod_dir = 'modules';
     }
     self::setMainIni('modules_dir', $mod_dir);
     // module path
     self::setMainIni('modules_path', self::pathBase() . "/" . $mod_dir);
     // files dir
     self::setMainIni('files_dir', 'files');
 }