exec, passthru, etc. for interactive command line scripts
| From: | Lee P. Reilly | Date: | Thu, 01 May 2003 16:11:31 +0000 |
| Subject: | exec, passthru, etc. for interactive command line scripts | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-145976@lists.php.net to get a copy of this message | ||
Can anyone tell me if there is a solution to the following?
I am running a program from the command line that, when executed, asks
for a filename. When the filename is given, it does some background
processing and returns to the command prompt. Simple. Can I interact
with this in PHP? I can run the program okay and get the message
prompting for the filename e.g.
$command = exec ( "fextrap.exe"); // $command = "LIST FILENAME :"
What I can't do however is figure out how to pass it the filename
*after* I have called the program. I thought that maybe a second call to
exec passing in the filename instead of an actual command might work,
but perhaps I was a little naive.
Does anyone have any ideas? I'm stumped.
Thanks!
- Best regards,
Lee