> I have a big array (nearly 1000 lines) that I would like to pass to a C
> program. I don't want to create a temporary file to pass my array (If
> possible ?!?), and I don't think the command line will fit my needs.
> 
> Is there a way to execute a program with a php string as the standard
> input. Something like shell redirection 'c_program < input.file' but with
> input.file being a php variable and not a real file ?? Any other solution
> ??

If your PHP script outputs to stdout, then you could run:

  c_program < myscript.php

Your PHP script will need to output the array as if it were outputting
to the screen or web page (ie, echo/print), and your C program will need
to know what format it's coming in as.

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to