hi there i am using the following function to list all the files and folders in a directory.
<?php
function listFolderFiles($dir){
$ffs = scandir($dir);
foreach($ffs as $ff){
echo $ff . "<br/>";
}
}
?>
but the problem seems to be i'm getting all the folders in the directory alright but i'm also getting a .
and a ..
. something like the one below.
.
..
direc
img
music
New Text Document.txt
and i am using the following function like: listFolderFiles('MyFolder');
what i want to do is get all the folders and files but not the .
and the ..
, what have i done wrong and how can i get what i want. thanks!