Hi all 

I'm trying to use is_dir to go thru a dir to list all dirs of that 

I have a dir with 3 other dirs in them

[root@universe templates]# pwd
/www/docs/webit/admin/templates
[root@universe templates]# ls -l
total 12
drwxr-xr-x   4 root     root         4096 Jan 12 13:16 1/
drwxr-xr-x   4 root     root         4096 Jan 12 13:16 2/
drwxr-xr-x   2 root     root         4096 Jan 12 13:16 CVS/


when I run this script section it only shows the CVS .. 

<?
$handle=opendir('/www/docs/webit/admin/templates');
echo "Directory handle: $handle\n";
echo "Files:<br>";
while (($file = readdir($handle))!==false) {
  if (is_dir($file)){
    print "$file<BR>";
  } 
}
closedir($handle);
?>

can anybody help out why it doesn't see 1 and 2 as directories ? 

Henti 


-- 
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