Re: Re: Using Exec Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, June 17, 2005 5:50 am, Davide Pasqualini said:
> I did as You suggested:
>
> <?php
> $win_cmd = "\"C:\\Hello.exe\"";
> exec($win_cmd, $stdout, $stderr);
> print "Standard output:\n";
> print_r($stdout);
> print "Standard error:\n";
> print_r($stderr);
> ?>
>
> but Hello.Exe, a very simple program, doesn't run and my browser seems
> waiting something from the server.
>
> Can I run a program (exe file) in another way ?

If you've got the Hello.exe running, but not returning, you could *MAYBE*
do :

<?php exec("Hello.exe &", $output, $error);?>

The & will put it into the background, even in Windoze, I think...  If
not, figure out how Windows starts background tasks, and do that.

Or make Hello.exe actually be a tiny little program that forks off the
program you really want to use, and then returns.

Or...  Lots of ways to try to force the OS to fork the process.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux