Re: Pipe the content of a variable to a process [message #173035 is a reply to message #173034] |
Fri, 18 March 2011 13:02 |
Marco
Messages: 11 Registered: March 2011
Karma:
|
Junior Member |
|
|
On 2011-03-18 Jerry Stuckle <jstucklex(at)attglobal(dot)net> wrote:
>>> What's in stderr? What happens if you write stdout and stderr to a file
>>> (for testing)?
>>
>> They are both empty.
>>
>>
>> Marco
>>
>
>
> Well, one of the things I see is you're using the -e flag with
> passthru() but not with proc_open(). That's a huge difference.
It's basically the same. Without »-e« the input goes to standard input, with
»-e« it goes as a command line input. I think, the problem here is not the
input, since the return value is zero, it is the missing output.
passthru( "echo 'set terminal svg;plot sin(x)' | gnuplot" );
The line above also produces the desired output.
Marco
|
|
|