Wow really thanks Colombo and Paul Dixon.
Now I can run php to call C ++ thn to pass back the php value ~ =)
Here I provide a sample cpp and php for it:
Simple program to add inputs:
a.cpp (a.exe):
#include<iostream>
sample.php:
<?php $a = 2; $b = 3; $c_output=`a.exe $a $b`; // pass in the two value to the c++ prog echo "<pre>$c_output</pre>"; //received the sum echo "Output: " . ($output + 1); //modify the value in php and output ?>
output:
5 Output: 6
source share