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);
> 
> 


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to