i think you could try "cmd /c dir" ----- Original Message ----- From: "Daniel Hellstrand" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]