adding folders that are empty to disallowed array

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nickharambee
Forum Newbie
Posts: 12
Joined: Thu Mar 03, 2011 3:55 pm

adding folders that are empty to disallowed array

Post by nickharambee »

Hi,

I am using an array which allows me to prevent particular subfolders from being included in a script that generates an audio playlist. It looks like this:

$disallowed=array('..', '.', 'simon', 'steve');

I would like to find a way of disallowing any folders which are empty, or, perhaps, better still, disallowing folders that do not have any MP3s in them (in case the script interprets folders as not empty if they contain system files which are automatically generated).

Would someone be able to help with this?

Thanks,

Nick
Post Reply