PHP: List files in directory, exclude backups
I'm writing a PHP script which is to (amongst others) iterate a directory and list the files contained within it. However, currently all files are listed, including backups (those ending with "~") and working files (starting and ending with "#"). Is there an easy way to exclude these files, or do I have to test for file endings when deciding to display the file or not?
|