I am working on an Apache environment with Windows Server 2003 as the OS. I am trying to execute a system call/program that I built.
The program is called test.exe and takes some parameters:
My code is as follows(NOTE the test.exe is debugged and working via the command line)
Code: Select all
<?php
//exec('e:\backup',$out_arr, $retval);
exec("c:\backup_program\test c:\progra~1\postgresql\8.1\bin localhost focus \\\10.1.2.7\SISBACKUP",$out_arr, $retval);
for($i = 0; $i<=sizeof($out_arr);$i++)
{
echo $out_arr[$i]."<p>";
}
echo "<p><p>RETURN VAL: " .$retval;
?>AND this is the output....
c:\progra~1\postgresql\8.1\bin\pg_dump -h localhost -U swanley007 focus > \\10.1.2.7\SISBACKUP\Backup-Mon-Aug-14-10-52-19-2006.backup
RETURN VAL: 0
If I run the program without any options, ie
Code: Select all
system('c:\backup_program\test');....Thanks
Stan Swank II