I would like to compile a c++ program in a php file.I have attempted to compile directly in unix by typing a command (gcc...), the .out file can be generated. But in php file, I don't know what's problem is. Can anyone help me?? There are some codes in my php file for reference.Thanks.
<?
$command =
"gcc -lm /usr1/median.cpp -o /usr1/aba.out" ;
exec($command , $arr) ;
echo $arr."<br>" ; // for debug
?>
Note: /usr1/ is a path of the file