http_query function takes an url as the first argument, for example,
http_query("http://localhost/test.php?uri=$(ru%7Bs.escape.param%7D)", "$var(result)");
what i would like to do is this:
http_query("$sel(cfg_get.local.http_query_url)", "$var(result)");
that is, instead of giving url argument as a fixed string, i would like to take it from cfg variable.
the problem is that if i give local.http_query_url string value "http://localhost/test.php?uri=$(ru%7Bs.escape.param%7D)", pseudo variables and transformations in the value are not evaluated.
is there any current means to get them evaluated? something like
http_query(eval("$sel(cfg_get.local.http_query_url)"), "$var(result)");
????
-- juha
2010/6/26 Juha Heinanen jh@tutpro.com:
http_query function takes an url as the first argument, for example,
http_query("http://localhost/test.php?uri=$(ru%7Bs.escape.param%7D)", "$var(result)");
what i would like to do is this:
http_query("$sel(cfg_get.local.http_query_url)", "$var(result)");
that is, instead of giving url argument as a fixed string, i would like to take it from cfg variable.
the problem is that if i give local.http_query_url string value "http://localhost/test.php?uri=$(ru%7Bs.escape.param%7D)", pseudo variables and transformations in the value are not evaluated.
is there any current means to get them evaluated? something like
http_query(eval("$sel(cfg_get.local.http_query_url)"), "$var(result)");
????
Same occurs when setting a pv containing another pv and trying to use the resulting pv into xlog function. A workaround is generating the new pv with concatenations:
- This doesn't work as expected:
$var(final_string) = "$rU@something"; xlog("L_INFO", "final string = $var(final_string)\n"); => final string = $rU@something
- This works as expected:
$var(final_string) = $rU + "@something" + .... ; xlog("L_INFO", "final string = $var(final_string)\n"); => final string = 12345678@something
However this is not the same case as yours...