not is more easy use system ?
$output = system('/path/to/a.out');

--
----------------------------------------------
            Alberto Ferrer
    [EMAIL PROTECTED]
  http://www.barrahome.org
----------------------------------------------
Syntax Error in KITCHEN.H: COFFEE not found.
"Jason Wong" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> 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.
> */
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to