this code will delete all the files from a directory on the server. be careful when using this as it will delete everything in the directory so use it wisely or make sure you have backups if it is implemented on the wrong directory.
it works by searching for all the file which have a full stop (.) in side the file name. it does not matter what the extension is it will be deleted.