hello,
when a web request comes to my index.php, i would like index.php to execute
a php script stored in an external file and capture the external script's
output to a variable.
i am doing this because the external script can read the database and can
emit xml that i want to use. index.php (or whatever) wants to grab this xml
and pass it through an xslt.
i know that if the external php script had a function declared, and the
function returned a string value with the xml contents, then i could use
"require" or a similar construct and call the function. the question that i
am trying to answer is what to do if the external script uses echo() to
output the results? how to capture its output during request processing?
besides, i do not like spawning another process for that and piping to it.
it might not scale well. ;-)
please help.
thanks
konstantin
when a web request comes to my index.php, i would like index.php to execute
a php script stored in an external file and capture the external script's
output to a variable.
i am doing this because the external script can read the database and can
emit xml that i want to use. index.php (or whatever) wants to grab this xml
and pass it through an xslt.
i know that if the external php script had a function declared, and the
function returned a string value with the xml contents, then i could use
"require" or a similar construct and call the function. the question that i
am trying to answer is what to do if the external script uses echo() to
output the results? how to capture its output during request processing?
besides, i do not like spawning another process for that and piping to it.
it might not scale well. ;-)
please help.
thanks
konstantin
Comment