Welcome Guest, Not a member yet? Register   Sign In
none recursive get_filenames

Is there anyway to use get_filenames without it being recursive? I only want the files listed in the directory is specify not in child directories!

[eluser]Pascal Kriete[/eluser]
I don't think there is. You could use the directory helper's directory_map function instead. That would leave you with files and directories, so you would have to filter out the directories:

$dir = './downloads/';
$map = directory_map($dir, TRUE);

foreach($map as $file)
    if( ! @is_dir($dir.$file)
        echo $file;

Hope that helps.

fab, thank you Smile

Theme © iAndrew 2016 - Forum software by © MyBB