html - how can i assign values to my c program with php -


i'm trying run c program of adding 2 numbers php in web browser. when run command exec"gcc name.c -o & a" returns garbage result sum : 8000542.00. doesn't ask input. want give inputs scanf browser. please suggest me how can resolve problem. have tried couldn't handle successfully.

$desc = array(0=> array ('pipe','w'), 1=> array ('pipe','r')); $cmd = "c:\xampp\htdocs\add.exe"; $pipes=array(); $p = proc_open($cmd,$desc,$pipes);  if(is_resource($p)) {   echo stream_get_contents($pipes[0]);  fclose($pipes[0]);   $return_value=proc_close($p);  echo $return_value; 


Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -