コード例 #1
0
ファイル: RaiReplay.php プロジェクト: nixxo/umsp-plugins
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;
}
コード例 #2
0
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;
}