Hello,
I am needing to delete a group of uploaded files based on an ID in the file name. An example filename would be "ID-343_23234.jpg", with 343 being the ID and 23234 being a random number created when the file is uploaded. How do I delete all files in the images folder that begin with "ID-343_" without doing some kind of test within a loop? Preferably using a wildcard...
Here is some code that does not work -
$fileName="/home/lspeagle/public_html/properties/ID-".$id."*";
unlink($fileName_);
Thanks for any help,
dsmith