Re: exec, passthru, etc. for interactive command line scripts
| From: | Marek Kilimajer | Date: | Fri, 02 May 2003 11:28:36 +0000 |
| Subject: | Re: exec, passthru, etc. for interactive command line scripts | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146097@lists.php.net to get a copy of this message | ||
Does not it have a switch to provide the filename on the command line? If it does not, try
$command = exec ( "echo $filename | fextrap.exe");
Lee P. Reilly wrote:
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