Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Andreas Lindner
Added: Jan 28, 2018 5:30 PM
Views: 8
Tags: no tags
  1. foreach (glob('/ordner/dateina*') as $file) {
  2.     if (is_file($file)) {
  3.         if (time() - filemtime($file) >= 3600) {
  4.             unlink($file);
  5.         }
  6.     }
  7. }