hello all, I am trying to use either of the functions above to execute a compiled c program on linux. The command line works with ./a.out (a.out being the filename). Both my test.php and the exe are in the same directory. I've tried combinations of all the following. Thx Mignon
<? error_reporting (E_ALL); error_reporting (E_ERROR | E_WARNING | E_PARSE); echo "Here it comes:"; $var1 = exec(a.out); echo $var1;//produces:Here it comes: //tried "a.out"'a.out'"./a.out"'./a.out' //./a.out ******************************************* $var = passthru(a.out, $ret); echo $var;//produces:(nothing) echo $ret;//produces: 127 ********************************** $var2 = system(a.out); echo $var2; //produces:(nothing) ****************************** $var6 = "./a.out"; $var7 = exec($var6, $var_array[], $ret_var); echo $var7;//produces:(nothing) echo $var_array[];//produces:Array echo $ret_var;//produces:127 echo $var6;//produces:(nothing) ******************************************* $var3 = exec('./a.out', $var_array[], $ret_var); echo $var3;//produces:Here it comes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php