php - find files (photo*.jpg) and return results to an array
Hi guys,
I'm having some problem creating a php function that searches a specific path for for files that match the patern "photos*.jpg" or "pics_?.gif". If the files are found I would like the results to be returned to an array Thanks!. |
What specific problem are you having?
Have you tried the readdir($directory_path_goes_here) function? |
Hi Unseen,
I currently working on a realestate website and I need to check if a photo(s) exists for a property (house, busnisess, etc..). The photo name coresponds to the propety id. for example if the property id number = 50123, then the filename for that photo would be "50123.jpg". However there are some properties that have more than one photos so for the secon photo the filename would be something like "50123_2.jpg" and the 3rd would be "50123_3.jpg" and so on. so now, given the directory with the images I have to check if a photo exist for a selected property and also I need to check if there are more images for that property. Thaks alot for your help |
All times are GMT -5. The time now is 12:58 AM. |