So, I have this function and for some reason, it only returns dots, while anywhere else it returns what it should
function scan($dir){
$open = opendir($dir);
$Name = readdir($open);
return $Name;
}
scan('/home/user/scan/scan-test2');
I used the exact same way of opening directories in another function
and for some reason there it reads everything that is inside scan-test2
.
In scan-test2
there is a folder with 4 text files in it