I'm trying to make a PHP script to list everything in a directory but I want to exclude certain files ending in desc.txt as they'll take up too much space in the list. (They're there to provide descriptions to the actual script of each folder/file)
if ($file !== "." && $file !== ".." && $file !== "desc.txt"){
That hides the whole "../" button to go up a directory and stuff, but I really can't figure out how to make it hide files ending in desc.txt. I tried * and % and glob and all that other stuff but nothing has worked so I just have it there as desc.txt, any ideas?