Re: Using Exec Function

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

 



Davide Pasqualini wrote:
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 ?

Thank in advance for your help.

Davide

PHP will just sit there waiting for Hello.exe to finish with output / error status. What is the command line output when you execute this program?

Are you sure that Hello.exe isn't running, or is it possible that PHP is just not responding (which makes you think that it didn't execute Hello.exe)? Because if Hello.exe starts up and doesn't exit then PHP is going to sit there forever waiting on Hello.exe to finish.

--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

--
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