Re: PHP script and external C program
| From: | ing.Martin Prášek | Date: | Tue, 28 May 2002 12:27:58 +0000 |
| Subject: | Re: PHP script and external C program | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99469@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "John Holmes" <holmes072000@charter.net>
To: "'ing.Martin Prášek'" <prasek@silesia.cz>;
<php-general@lists.php.net>
Sent: Monday, May 27, 2002 8:28 PM
Subject: RE: [PHP] PHP script and external C program
> I don't have example code, but what you want is the exec() function. Be
> careful passing user variables to a command line program.
In PHP docs it seems,that exec() does not solve my problem . It is easy to
grab output of "mycomand" to an array, but it seems , that there is no way
to feed "mycommand"s STDIN with something, ie commandline is only way to
pass some argument or data for "mycomand".....
I need something like this hypotetical example:
/bin/mycommand < $variable > $parsed_variable
or
$variable | /bin/mycommand | $parsed_variable