Home › Forums › Back End › Get Directory List › Re: Get Directory List
February 15, 2012 at 12:12 pm
#96745
bungle
Member
which line is line 53?
I am not sure why you are doing
while ($file = scandir("."))
I think you should be doing
while ($file = scandir($handle))
FWIW to get a directory list I normally do
$dir = "/mydirectory";
if (file_exists($dir)) {
$dir = opendir($dir);
while (false !== ($filelist = readdir($dir))){
if (in_array($filelist, array(".", "..", ".htaccess", ))) continue;
echo $filelist;
}
}