note 55415 deleted from function.rmdir by aidan

From: Date: Wed, 15 Apr 2009 04:28:38 +0000
Subject: note 55415 deleted from function.rmdir by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-153272@lists.php.net to get a copy of this message
Note Submitter: dexn (at) metazure.com ---- Here's a short function I wrote to remove a directory and all it's contents using the glob() function: function rmdirr($dir) { if($objs = glob($dir."/*")){ foreach($objs as $obj) { is_dir($obj)? rmdirr($obj) : unlink($obj); } } rmdir($dir); }

« previous php.notes (#153272) next »