Re: exec() and passthru()

From: Date: Thu, 19 Jun 2003 18:20:45 +0000
Subject: Re: exec() and passthru()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-152211@lists.php.net to get a copy of this message
On Friday 20 June 2003 01:56, Mignon Hunter wrote: > I'm only subscribed to digest and found your reply in archives and > couldnt figure out how to reply :{ > > Anyway, right now I'm just trying to get something to work. The c exe > is as follows: > ****************************** > #include <stdio.h> > #define NAME "Mignon" > int main(void) > { > > int q; > > q = 5; > printf("Hello, %s,%d \n", NAME,q); > return 0; > } > ********************************* > > I'm trying to return the "Hello, Mignon, 5" which is what's outputted on > the command line. In that case what you want is shell_exec(): $output = shell_exec('/path/to/a.out'); // note the whole command line has // to be enclosed in '' or "". echo $output; -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Taxes are going up so fast, the government is likely to price itself out of the market. */

« previous php.general (#152211) next »