function getConfigValue($key, $default_value) { $conf_dir = function_exists('_getUMSPConfPath') ? _getUMSPConfPath() : '/conf'; $config = file_get_contents($conf_dir . '/config'); if (preg_match("/RAIREPLAY_{$key}='(.+)'/", $config, $matches)) { return trim($matches[1]); } return $default_value; }
function getPar($param) { $config = file_get_contents((function_exists('_getUMSPConfPath') ? _getUMSPConfPath() : '/conf') . '/config'); if (preg_match("/{$param}=\\'(.+)\\'/", $config, $m)) { if (trim($m[1]) != "") { return $m[1]; } } $ret = ""; return $ret; }