Re: Exec

From: Date: Fri, 09 Jun 2000 20:15:42 +0000
Subject: Re: Exec
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1433@lists.php.net to get a copy of this message
At 11:28 AM -0700 6/9/00, david <desbi22@cict.fr> wrote: >Here is a piece of my script and it doesn't work ><? >shell_exec ("/usr/local/apache/htdocs/php/test"); > >$opt_file=fopen("test_result","r"); /*result of execution of test */ >while(!feof($opt_file)) > { > $line= fgets ($opt_file,100); > echo "$line <BR>"; > } >fclose($opt_file); I don't know anything about shell_exec(). Here's what I do: $lines = array(); exec("/opt/numerical/bin/xxx", $lines); for ($i = 0; $i < count($lines); $i++) ... My program writes to standard out and the $lines array contains all of the output. Bill --- Bill Rausch, Software Development, Unix, Mac, Windows Numerical Applications, Inc. 509-943-0861 bill@numerical.com

« previous php.general (#1433) next »