Re: why doesn´t exec("dir"); wor k ?

From: Date: Fri, 16 Nov 2001 01:43:10 +0000
Subject: Re: why doesn´t exec("dir"); wor k ?
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-10444@lists.php.net to get a copy of this message
i think you could try "cmd /c dir" ----- Original Message ----- From: "Daniel Hellstrand" <danhel-9@student.luth.se> To: <php-windows@lists.php.net> Sent: Friday, November 16, 2001 3:42 AM Subject: Re: [PHP-WIN] why doesn´t exec("dir"); work ? > Shouldn´t it be: foreach( $dirContents as $dirEntry ) ? > And another problem: I still get an error saying: "unable to fork [dir]" > when I run this (I got that when I ran exec("dir") too) > > /Dan > > Chris Boget wrote: > > > > why can´t I run exec("dir"); ? > > > > What you want is: > > > > exec( "dir", $dirContents ); > > foreach( $dirEntry as $dirContents ) { > > echo $dirEntry; > > > > } > > > > I believe that'll work and do what you want... > > > > Chris > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.windows (#10444) next »