Finally, I resolved my problem.
Here is my solution.
I'm using Windows server with apache 2 and can't use command "is_executable", same for "cat" or "type" command shell.
So after robot functions :
if ($usetool) {
rename($tempfile1,$tempfile2);
exec($command,$result,$retval);
unlink($tempfile2);
add :
$f_handler = fopen($tempfile2.$ext,'r');
while (!feof($f_handler)) {
$result[] .= utf8_encode(fgets($f_handler,8192));
}
fclose($f_handler);
unlink($tempfile2.$ext);
and comment lines after :
/*if (!empty($ext)) {
$command = 'type '.$tempfile2.$ext;
exec($command,$result,$retval);
unlink($tempfile2.$ext);
}*/
So for me it works fine.
Bye
|