note 32534 deleted from function.rmdir by didou

From: Date: Fri, 30 May 2003 12:49:13 +0000
Subject: note 32534 deleted from function.rmdir by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-49423@lists.php.net to get a copy of this message
Note Submitter: Pulp ---- I have had trouble with rmdir, and I didn't understant why. I wrote : ___$d = dir ($path); ___for (;($file = $d->read());) ___{ ______if (($file == ".") || ($file == "..")) continue; ______unlink ("$path/$file"); ___} ___$d->close(); ___rmdir ("$path"); but the rmdir() didn't work... In fact, you have to first destroy de directory pseudo-object with : ___unset ($d); ... just before the rmdir ("$path"); command. Hope this helps...

« previous php.notes (#49423) next »