I'm using a simple glob routine to list files in a folder/directory and would like to exclude a few files whose file names contain certain keywords.
For instance below, I'm excluding any files that contain the term "thumb" (which are thumbnails). I would like to exclude several others from the results... but I cannot get an array of excluded terms to work. How can I use this SAME routine to exclude other terms from the results?
$files = glob("/home/*.*");
for ($i=0; $i<count($files); $i++)
{
$num = $files[$i];
if (!stristr($num,'thumb'))
{
echo "$num<br>";
}
}