Recursive file deletion with PHP
Posted: February 18th, 2008 | Tags: PHP • Tutorials | Posted in: PHP, TutorialsThis is a handy PHP function (I can’t remember where I found it) which performs a recursive deletion of every file in a given directory. I’ve been using it to periodically flush cache files created by my CMS on this site. function destroy($dir) { $mydir = opendir($dir); while(false …
Read more…