Re: Capturing output of shell script.
| From: | Brad Hubbard | Date: | Sat, 30 Jun 2001 11:12:03 +0000 |
| Subject: | Re: Capturing output of shell script. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55707@lists.php.net to get a copy of this message | ||
On Sat, 30 Jun 2001 06:36, Charles Williams wrote:
> Hello all,
>
> I have an .sh shell script being executed from a php4 call. I need to
> capture the string return and work with that in the php script. The only
> problem is that the call works but I cannot get the returned string. I've
> tried using exec, passthru, ``, system, and escapeshellcommand. Nothing
> seems to work. any ideas?
$capture =
script.sh 2>&1; // redirect standard error to standard output
Cheers,
Brad
--
Brad Hubbard
Congo Systems
12 Northgate Drive,
Thomastown, Victoria, Australia 3074
Email: brad@congosystems.com
Ph: +61-3-94645981
Fax: +61-3-94645982
Mob: +61-419107559