note 10945 deleted from function.rmdir by jimw

From: Date: Wed, 02 Jan 2002 01:27:45 +0000
Subject: note 10945 deleted from function.rmdir by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-24088@lists.php.net to get a copy of this message
To remove whole directories that are not empty, use this: $dir = "x"; // (replace x with the directory name) $handle = opendir($dir); while($file = readdir($handle)) if($file != "." && $file != "..") unlink($dir . "/" . $file); closedir($handle); rmdir($dir); Philipp

« previous php.notes (#24088) next »