Re: EXEC and Windows

From: Date: Fri, 17 May 2002 15:26:48 +0000
Subject: Re: EXEC and Windows
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-13834@lists.php.net to get a copy of this message
Hi, 'exec' will returm the last line of any output. The syntax is: <snip src="http://www.php.net/manual/en/function.exec.php"> string exec ( string command [, string array [, int return_var]]) </snip> If you include the second parameter, the contents of the output will be placed in the array, each line being an element in the array. <?php $lastline = exec( "$command", $resultsArray ); ## print out the results, if any. for($i=0; $i < sizeof($resultsArray); $i++) { ## you have to echo out the ## results from each element ## of the array. echo $resultsArray[$i] . '<br>'; } ?> HTH! Nicole Amashta www.aeontrek.com Bernard Florent wrote:
Hello I try to use EXEC function to execute a command line. The command line is correct but the exec doesn't return anything. Have you any idea about it ? I give you my source : exec('"c:\progra~1\swish-e\swish-e.exe" -w "test" -f C:/Progra~1/EasyPHP/www/atelier_dev/data/index.swish-e',$out);


« previous php.windows (#13834) next »