Re: storing errors from shell_exec command

From: Date: Sat, 10 Aug 2002 04:21:26 +0000
Subject: Re: storing errors from shell_exec command
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-111929@lists.php.net to get a copy of this message
On Saturday 10 August 2002 04:14, rdkurth@starband.net wrote: > I need to redirect the output from the shell_exec return variable to a > file. What I have below is not working. What I need to get from the > shell_exec is ant errors that happen and then I what to store those > errors in a error file > > $output=shell_exec($cmd); > $cmd ="$output > /usr/autoserv/errlog"; Not sure whether it'll make any difference, but you do NOT need the backticks. > exec($cmd); Why not do it in a single step? shell_exec("command_to_execute > /usr/autoserv/errlog"); -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* A fool and his money are soon popular. */

« previous php.general (#111929) next »