PHP scandir strange behaviour
Posted
by kmunky
on Stack Overflow
See other posts from Stack Overflow
or by kmunky
Published on 2009-10-30T03:17:53Z
Indexed on
2010/05/12
18:54 UTC
Read the original article
Hit count: 262
ok, so what i'm trying to do is to scan the "previous" folder.
$scanned = scandir("..");
foreach($scanned as $file){
if(is_file($file)){
print $file."<br />";
}
}
even though in my ".." directory i have 20+ files i get just three rows
index.jpg
index.php
template.dtd
i noticed that if i don;t use that is_file if clause it returns all file names; but i really need that if clause.
© Stack Overflow or respective owner