I'm posting here because i don't think this is a windows issue - I am running php 3 on a windows box... with that in mind here's the problem. I am trying to print out the contents of a drive from a user input form.
It's reading the contents... i can print out the files and directories BEFORE the is_file and is_dir statements. But it won't even enter the is_file and is_dir loop.
$handle = opendir($drive) ;
$fileCounter = 0 ;
$dirCounter = 0 ;
while ($file = readdir($handle))
{
if ($file != "." && $file != "..")
{
if (is_file($file) )
{
echo "in File loop" ;
$allFiles[$fileCounter] = $file ;
$numFiles = sizeof($allFiles);
$fileCounter++ ;
}
if (is_dir($file) )
{
echo "in dir loop" ;
$allDirs[$dirCounter] = $file ;
$numDirs= sizeof($allDirs);
$dirCounter++ ;
}
}
}
closedir($handle);