Re: redirect stdout and stderr to PHP variables? [message #176825 is a reply to message #176824] |
Fri, 27 January 2012 10:42 |
Erwin Moller
Messages: 228 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 1/27/2012 11:23 AM, crankypuss wrote:
> On 01/25/2012 03:56 PM, Curtis Dyer wrote:
>> crankypuss<no(at)email(dot)thanks> wrote:
>>
>>> I'm sure there's a way to do this, probably some simple syntax
>>> I've not run into and am too stupid to find in the manual or
>>> through google-fu or otherwise.
>>>
>>> I'd like to issue an arbitrary shell command in a subroutine and
>>> have it return an array that contains one element representing
>>> stdout and another element representing stderr.
>>
>> Have a look at `proc_open()' for more fine-grained control of a
>> process:
>>
>> <http://php.net/proc_open>
>>
>>
>> <snip>
>
> Third recommendation for proc_open() this morning, you guys looking at
> each others' notes? <g> Thanks.
I was wondering that too.
When I posted my suggestion, I didn't see any others suggesting it.
But today I saw that Jerry and Curtis wrote it one day earlier.
I can imagine I had some mental black-out, but this looks like a mondial
one. ;-)
Regards,
Erwin Moller
--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
|
|
|