Can I delete the file without knowing its type in php? I want to do something like this:
unlink('../gallery/images/pic23.?)
How can I perform this ? Thanks in Advance
You can find all of the files with glob()
and then delete them individually, like this:
foreach( glob( '../gallery/images/pic23.*') as $file) {
unlink( $file);
}