The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Get Directory List Re: Get Directory List


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;