note 91038 deleted from function.unlink by danbrown

From: Date: Fri, 22 May 2009 14:47:32 +0000
Subject: note 91038 deleted from function.unlink by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155889@lists.php.net to get a copy of this message
Note Submitter: euxneks ---- Please note that unlink on an empty directory will fail with a warning - the example given above doesn't work for the directory at least: <?php //testing unlink with dirs. mkdir( 'emptydir', 0777 ); unlink( 'emptydir' ); ?> The above fails with this: "PHP Warning: unlink(emptydir): Is a directory in /root/temp.php on line 5" Use rmdir() on an empty directory as it works without fail or warnings.

« previous php.notes (#155889) next »