Re: exec() and passthru()

From: Date: Thu, 19 Jun 2003 18:53:29 +0000
Subject: Re: exec() and passthru()
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-152215@lists.php.net to get a copy of this message
not is more easy use system ? $output = system('/path/to/a.out'); -- ---------------------------------------------- Alberto Ferrer albertof@barrahome.org http://www.barrahome.org ---------------------------------------------- Syntax Error in KITCHEN.H: COFFEE not found. "Jason Wong" <php-general@gremlins.biz> escribió en el mensaje news:200306200220.45191.php-general@gremlins.biz... > 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 (#152215) next »