Hello. I was wondering if anyone can help me with the following programming concern.
Using php. Does anyone know how to scan a folder located on a server; Seeing if the folder contains files of a specific file type. Namely, If I wanted to search for all the files in a folder with a *.jpg extension. USING IF / ELSE structure. IF the file(s) are found echo" JPG files exist" ELSE echo"No files containing such extensions exist."
Sounds like a homework assignment, but the interested operations you want to use are opendir, readdir, and then check the name of the file returned by readdir to see if the extension you are looking for exists.
Once you have some code written, post back if you need more help.