Re: exec/system/passthru ??????

From: Date: Thu, 15 Mar 2001 16:05:38 +0000
Subject: Re: exec/system/passthru ??????
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-6075@lists.php.net to get a copy of this message
Hello, The program I want to run is a command-line program running on a dos-shell; I need to run this program and send commands to it whiel its running. The program I am running excepts keyboard input commands, but I want my program to give it the commands it needs. Is there anyway of doing this? I want my program to launch a dos prgram (Does this then hangs?) and then send commands to the same program it just launched. Fernando Madruga - "Why would you want to leave a program running in the background, if you'reusing it to generate content?" No this script is not for the webserver to run at all. This is a stand alone program that I might add php-gtk to in the future. Thanks again, Josh Seward js389599@ohiou.edu ----- Original Message ----- From: "Fernando Madruga" <FMadruga@ascoimbra.pt> To: "Josh Seward" <js389599@ohiou.edu>; <php-windows@lists.php.net> Sent: Thursday, March 15, 2001 10:48 AM Subject: RE: [PHP-WIN] exec/system/passthru ?????? Why would you want to leave a program running in the background, if you're using it to generate content? First, I believe that Windows NT/2K does not accept or like the ampersand (&) on the end: all programs launched will run in the background, unless they are command-line programs running on a dos-shell; Secondly, I guess that exec(), passthru(), system() and the backticks all have problems on Windows platforms?! You'd be better off using two different programs: one would print whatever you wanted it to print and them would launch the second program to be left running doing whatever it has to do just before exiting... :) HTH, Fernando Madruga -----Original Message----- From: Josh Seward [mailto:js389599@ohiou.edu] Sent: quinta-feira, 15 de Março de 2001 15:10 To: php-windows@lists.php.net Subject: [PHP-WIN] exec/system/passthru ?????? I am trying to open a program and leave it running in the background. The script will always hang until I close the program that it opens? Here is my code $result = passthru($command."& 1> output.txt 2>&1; print output.txt; &", $pass); I have tried using exec() system() and passthru() all with the same effect? Does anyone know how to do this? I am running win2000! Thanks, Josh Seward js389599@ohioe.edu -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net For additional commands, e-mail: php-windows-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#6075) next »