Is there a glitch with opendir/readdir?
Posted
by George Edison
on Stack Overflow
See other posts from Stack Overflow
or by George Edison
Published on 2010-04-27T03:21:43Z
Indexed on
2010/04/27
3:23 UTC
Read the original article
Hit count: 318
Here is my PHP code:
<?php
// Enumerate the directories in styles
$styles_dir = 'styles/';
if($handle = opendir($styles_dir))
{
while(FALSE !== ($file = readdir($handle)))
{
echo $file . '(' . is_dir($file) . ')<br>';
}
}
?>
Here are the directories in styles
:
And here is the output:
.(1)
..(1)
forest()
industrial()
Why aren't forest
and industrial
directories?
© Stack Overflow or respective owner