RE: [PHP] exec, passthru, etc. for interactive command line scrip ts
| From: | M.A.Bond | Date: | Thu, 01 May 2003 16:16:01 +0000 |
| Subject: | RE: [PHP] exec, passthru, etc. for interactive command line scrip ts | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-145977@lists.php.net to get a copy of this message | ||
Just guessing really, but have you tried:
$command = exec (" fextrap.exe < filename ");
(I can't remember if the filename after the < needs to contain your filename
or it it is your filename)
Mark
-----Original Message-----
From: Lee P. Reilly [mailto:lreilly@lanl.gov]
Sent: 01 May 2003 17:12
To: PHP
Subject: [PHP] exec, passthru, etc. for interactive command line scripts
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php