public static function open($file) { global $config; // static variable singleton if (!self::$config_file) { self::$config_file = $file; } // Check if config file exist and is readable, then include it if (is_readable(self::$config_file)) { require_once self::$config_file; //echo 'configuration file <b>' . self::$config_file . '</b> succesfully loaded <br />'; self::$config = $config; return true; } else { throw new Exception("Config file not found or bad file permissions"); } }