php exec and black window
Posted: 31. January 2007 19:10
Hi,
using xampp + php as per the default install.
Trying to run a command line program using exec. Actually I have no
problem running the program, but nothing I do seems to stop it
briefly showing a black window for the process.
I've read a lot of discussion of this suggesting things like "start /b"
and "cmd /c", but nothing seems to make any difference.
The command lookds like
prog.exe does not open any windows itself, but I always get the black
window appear and then disappear. The program runs correctly
each time it is executed.
Can anyone shed any authoritative light on this?
A few web articles suggested using php-win.exe for running php within
xampp, but I cannot figure out how to change this.
Many thanks for your help.
Mike
using xampp + php as per the default install.
Trying to run a command line program using exec. Actually I have no
problem running the program, but nothing I do seems to stop it
briefly showing a black window for the process.
I've read a lot of discussion of this suggesting things like "start /b"
and "cmd /c", but nothing seems to make any difference.
The command lookds like
- Code: Select all
exec("start /b c:/stuff/prog.exe < file.in > file.out 2> nul", $output);
prog.exe does not open any windows itself, but I always get the black
window appear and then disappear. The program runs correctly
each time it is executed.
Can anyone shed any authoritative light on this?
A few web articles suggested using php-win.exe for running php within
xampp, but I cannot figure out how to change this.
Many thanks for your help.
Mike