Is it possible to search a dir full of .pdf's for a specific file name or a file name in relevance to the keyword entered? If so, can someone please point me in the right direction? Thanks
Use glob() to list all the pdf files, then match from there using either a regular expression or a simple string search
Here you go: <?php //directory path $dir = "forums/"; //file to search for $search = 'filename'; foreach (glob($dir . ''.$search.'.pdf') as $file) { //$file contains your searched file //Do something here .... } ?> PHP:
I got it working, even figured out how to use a wildcard. But there seems to be a problem(some what). It seems to be case sesative and I am hoping there is something I can do to make case insesative. Any ideas?