I need to pass a value from PHP to C++. I think I can do with PHP's passthru()
function.
Then I want C++ to do something to that value and return the result to PHP.
This is the bit I can't work out, does anyone know how to pass data from C++ to PHP?
I'd rather not use an intermediate file as I am thinking this will slow things down.
You could have your c++ app send its output to stdout, then call it from PHP with backticks, e.g.
$output=`myapp $myinputparams`;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With