/** * Set root * @throws exception */ public static function set_root($root) { if (!is_dir($root)) { throw new exception('root not found ' . $root); } self::$root_path = self::fix_path(realpath($root)); self::$public_path = self::$root_path . 'public/'; self::$docs_path = self::get_root(self::DIR_CONFIG); self::$uploads_path = self::get_public('uploads/'); self::$tmp_path = self::get_root(self::DIR_TEMP); }