Is there a way to write the PHP file_exists function so that it searches a directory for a file with an arbitrary extension. For instance, suppose I knew that a file were c
If you need a little more control and are on pre PHP 5.3 you could use a DirectoryIterator or RecursiveDirectoryIterator. Both have a lot of great function for added control and manipulation.
PHP docs are at DirectoryIterator and RecursiveDirectoryIterator