Simple question – simple answer:
How do I delete all files in a directory with PHP?
[php]$files = glob(‘/path/to/directory/*.*’);
foreach($files as $file)
unlink($file);[/php]
Simple question – simple answer:
How do I delete all files in a directory with PHP?
[php]$files = glob(‘/path/to/directory/*.*’);
foreach($files as $file)
unlink($file);[/php]
Comments 1
Pingback: PHP – Delete files by pattern | Freelancer Martin Zeller - php asp.net java c# .net c++ xhtml seo magento zend framework coremedia dotnetnuke telerik