I have had this problem with exec, passthru with that configuration
aswell...

To read the files into an array, do this:
(http://www.php.net/manual/en/function.opendir.php)

<?php

if ($dir = @opendir("e:\\dir")) { // Notice the double "\\"
  while($file = readdir($dir)) {
    if ($file !="." && $file !="..") // If you donīt want the . and ..
       $files[] = $file;
    }
  }
  closedir($dir);
}

// Print the array
for ($i=0; $i<sizeof($files); $i++)

 echo $files[$i]."<br>";
}
?>

// Tobias

"SHAWN" <[EMAIL PROTECTED]> wrote in message
D1FF6C0809A9D411815D0050DA841BCC3EE5@ONSITESERVER">news:D1FF6C0809A9D411815D0050DA841BCC3EE5@ONSITESERVER...
> Using IIS5 on W2K Server, I can't get get the exec() or other similar
> commands to work.
>
> This is what I'm doing -
>
> exec( "dir/a-d/b $dir_name", $arFiles )
>
> The array doesn't contain anything! I've tried it with cmd.exe before the
> command, but it just seems to get stuck in a loop! Can anyone tell me how
to
> successfully use this command? Or if not, any other ideas on how to get
the
> file names inside a directory into an array?
>
> Thanks in Advance,
>
> Shawn Sellars
>
>



-- 
PHP General 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]

Reply via email to