configfile = $filename; } else die(FILE_DICT_NOT_FOUND); } function readConfig() { $fd = fopen ($this->configfile, "r"); while( !feof( $fd ) ) { $line = fgets( $fd, 4096 ); if (eregi( "^[A-Z]", $line )) { list ( $key, $val ) = split( "=", $line ); $key = trim($key); $val = trim($val); $configs[$key] = $val; } } fclose ($fd); $this->arrconfigs = $configs; } function getConfig($key) { if(array_key_exists($key,$this->arrconfigs)) return $this->arrconfigs[$key]; else return ''; } } ?>