note 109971 modified in function.unlink by danbrown
| From: | danbrown@php.net | Date: | Wed, 12 Sep 2012 17:32:18 +0000 |
| Subject: | note 109971 modified in function.unlink by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-190672@lists.php.net to get a copy of this message | ||
This will delete all files in a directory matching a pattern in one line of
code. <?php array_map('unlink',
glob("some/dir/*.txt")); ?>
--was--
This will delete all files in a directory matching a pattern in one line of code.
array_map('unlink', glob("some/dir/*.txt"));
http://php.net/manual/en/function.unlink.php