Re: Re: EXEC and Windows

From: Date: Sat, 18 May 2002 16:23:56 +0000
Subject: Re: Re: EXEC and Windows
References: 1 2 3  Groups: php.windows 
Request: Send a blank email to php-windows+get-13856@lists.php.net to get a copy of this message
First, have you made sure to: $out = array(); before the exec line? Also, does the program swish-e.exe return anything to output when you run it from the command line? -- Scott Carr OpenOffice.org Whiteboard-Doc Maintainer http://whiteboard.openoffice.org/doc/ Quoting firepages <fire@firepages.com.au>: > try > > exec('start c:\progra~1\swish-e\swish-e.exe -w test -f > C:/Progra~1/EasyPHP/www/atelier_dev/data/index.swish-e',$out); > > will start a seperate process but may kickstart it for you, I find exec a > bit wobbly on windows depending on the .exe in hand so I more often than > not > just create a batchfile with my command-line in it and then exec the bat > file, but then you get no returned value anyway :) , not knowing exactly > what your script is doing its hard to know how to help. > > Regards, > Simon Wheeler > firepages > > > "Nicole Amashta" <430ntr3k@bellsouth.net> wrote in message > news:3CE52138.4060508@bellsouth.net... > > 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 > > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/

« previous php.windows (#13856) next »