Re: passing args to c program
| From: | Maxim Maletsky | Date: | Mon, 19 May 2003 00:47:33 +0000 |
| Subject: | Re: passing args to c program | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148130@lists.php.net to get a copy of this message | ||
On 18 May 2003 11:23:50 -0400
Brian V Bonini <b-bonini@cox.net> wrote:
> which functions should i be looking at for passing values to a c++
> program and displaying or getting the output back?
This depends on what exactly you have meant. If you were passing the
variables through shell, you might as well rely on the post below
(system(), exec(), passthru(), etc) this will execute something as the
user your PHP runs under and will get back the result. Alternatively,
you might want to wrap up a PHP extension for your C program to interact
with it directly. This is harder, but if you know some C you can easily
manage it. Take a look at swig as well.
--
Maxim Maletsky
maxim@php.net