Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!not-for-mail From: "M. Strobel" Newsgroups: comp.lang.php Subject: Re: redirect stdout and stderr to PHP variables? Date: Thu, 26 Jan 2012 09:46:42 +0100 Lines: 31 Message-ID: <9oci7iF5giU1@mid.uni-berlin.de> References: <9obbi3F87kU1@mid.uni-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de gbxX3Ovm7ND7vQDDFFmmlwstshf0FaXmQM63Ix6pfE7JbNDcY= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.24) Gecko/20111101 Thunderbird/3.1.16 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:4616 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 =3D exec('rm this-does-really-not-exist.php 2>&1', $a, $rc= ); >>> php> echo $rc; >>> 1 >>> php> print_r($a); >>> Array >>> ( >>> [0] =3D> rm: Entfernen von =E2=80=9Ethis-does-really-not-exist.php=E2= =80=9C nicht >>> m=C3=B6glich: Datei >>> oder Verzeichnis nicht gefunden >>> ) >>> php> >> >> Thanks, will try these in the morning. >=20 > BTW, where is this syntax documented? I'd prefer understanding it to u= sing 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#Redirectio= ns The windows cmd.exe works quite the same in this point. /Str.