Answers for "php delete all files in folder"

PHP
0

php delete all files in folder

$files = glob('path/to/temp/*'); // get all file names
foreach($files as $file){ // iterate files
  if(is_file($file)) {
    unlink($file); // delete file
  }
}
Posted by: Guest on August-05-2021

Code answers related to "php delete all files in folder"

Browse Popular Code Answers by Language