Delete multiple files using unlink and array_map()

This will delete all files in a directory matching specific pattern. Applies unlink() to each file that meet glob pattern.


array_map('unlink', glob("some/dir/*.txt"));

Leave a comment

0 Comments.