note 38446 added to class.dir

From: Date: Sun, 21 Dec 2003 20:30:35 +0000
Subject: note 38446 added to class.dir
Groups: php.notes 
Request: Send a blank email to php-notes+get-62302@lists.php.net to get a copy of this message
I use this function to delete a folder: <?php function deleteDir($dir){ $d = dir($dir); while($f = $d->read() ){ if($f != "." && $f != ".."){ if(is_dir($dir.$f)){ deleteDir($dir.$f."/"); rmdir($dir.$f); } if(is_file($dir.$f)){ unlink($dir.$f); } } } $d->close(); } ?> ---- Manual Page -- http://www.php.net/manual/en/class.dir.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38446 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38446&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38446&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62302) next »