To filter out all files that contain myimage1
in the name, use glob
foreach (glob("*myimage1*") as $filename) {
unlink($filename);
}
solved PHP – Codeigniter – How to delete file with some name
To filter out all files that contain myimage1
in the name, use glob
foreach (glob("*myimage1*") as $filename) {
unlink($filename);
}
solved PHP – Codeigniter – How to delete file with some name