Your problem is mostly that you are listing the
contents of a sub-directory and then test if the found name is a folder in your
current directory.
The following is a working script (just as an example):
PHP Code:
<?php
$dir = opendir('./mangareader');
while($folder = readdir($dir))
{
if (is_dir("./mangareader/" . $folder))
{
echo "Folder: ./mangareader/$folder<br />";
}
else
{
echo "File: ./mangareader/$folder<br />";
}
}
closedir($dir);
?>