note 91545 modified in function.rmdir by danbrown

From: Date: Tue, 16 Jun 2009 16:16:38 +0000
Subject: note 91545 modified in function.rmdir by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-156932@lists.php.net to get a copy of this message
if you opened a dir with opendir() you must closedir() before try to execute rmdir() or you will get a "permision denied" error on windows systems. Wrong: <?php $handle = opendir($dirpath); //do whatever you need rmdir($dirpath); ?> Right: <?php $handle = opendir($dirpath); //do whatever you need closedir($handle) rmdir($dirpath); ?> --was-- if you opened a dir with opendir() you must closedir() before try to execute rmdir() or you will get a "permision denied" error on windows systems. Wrong: <? $handle = opendir($dirpath); //do whatever you need rmdir($dirpath); ?> Right: <? $handle = opendir($dirpath); //do whatever you need closedir($handle) rmdir($dirpath); ?> http://php.net/manual/en/function.rmdir.php

« previous php.notes (#156932) next »