note 91324 deleted from function.unlink by danbrown
| From: | danbrown@php.net | Date: | Fri, 05 Jun 2009 18:46:50 +0000 |
| Subject: | note 91324 deleted from function.unlink by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-156405@lists.php.net to get a copy of this message | ||
Note Submitter: e01
----
function rm($PATH)
{
if (is_dir($PATH) && $handle = opendir($PATH))
{
while (false !== ($file = readdir($handle)))
if ($file == '.' || $file == '..') continue;
else (!@unlink($PATH . '/' . $file)) delete($PATH.'/'.$file);
closedir($dh);
@rmdir($PATH);
} else return @unlink($PATH);
return true;
}