FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » redirect stdout and stderr to PHP variables?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: redirect stdout and stderr to PHP variables? [message #176804 is a reply to message #176803] Thu, 26 January 2012 08:46 Go to previous messageGo to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma:
Senior Member
Am 26.01.2012 09:33, schrieb crankypuss:
> On 01/25/2012 03:53 PM, crankypuss wrote:
>> On 01/25/2012 02:46 PM, M. Strobel wrote:
>>> php> $res1 = exec('rm this-does-really-not-exist.php 2>&1', $a, $rc);
>>> php> echo $rc;
>>> 1
>>> php> print_r($a);
>>> Array
>>> (
>>> [0] => rm: Entfernen von „this-does-really-not-exist.php“ nicht
>>> möglich: Datei
>>> oder Verzeichnis nicht gefunden
>>> )
>>> php>
>>
>> Thanks, will try these in the morning.
>
> BTW, where is this syntax documented? I'd prefer understanding it to using magic.

Hey, I just booted my system in the morning, and checked for news...

see here: http://www.gnu.org/software/bash/manual/bashref.html#Redirections

The windows cmd.exe works quite the same in this point.

/Str.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: enter search term via code?
Next Topic: FounderDating - Helping entrepreneurs find their co-founder & start companies!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 03:59:02 GMT 2024

Total time taken to generate the page: 0.04095 seconds