hi everyone,
i can't execute an extern program compiled in Unix OS from php. I want to execute an C executable with params but the EXEC function return false always. A note: i have permissions for execute in Unix. this is my source:
//Previously i have to connect to Unix count correctly
$dir=chdir("scripts");
$handle=opendir('.');
echo "Directory handle: $handle\n";
echo "Files:\n";
while ($file = readdir($handle)) {
echo "$file\n";
}
$meic=exec("make",$q1,$q2);//This is correct
//The wrong exec:
$coman="copies [c] nina.txt eurocaixer.c 13035_12960.c";//Copies is the executable and [c] nina.txt etc are params
//Exec Coman:
$executat=exec($coman,$a1,$a2);
🙂