note 9778 rejected and deleted from closedir by ronabop

From: Date: Wed, 29 Nov 2000 05:39:15 +0000
Subject: note 9778 rejected and deleted from closedir by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-8229@lists.php.net to get a copy of this message
hi there, i'am running an iis4 with php 4.03pl1 and i got some trouble with the opendir/closedir commands. may it be that the closedir has a delay before it closes the directory ? after opening a directory and deleting all files i want to delete the directory itself. but i got a permission denied. when i only try to delete the directory, without the opendir/closedir command in front, it works fine. here's the code: $all=opendir($path); while ($file=readdir($all)) { if ($file <> ".." and $file <> ".") { unlink($path.$file); unset($file); } } closedir($all); $path = substr($path,0,strlen($path)-1); $cmd = $path; $cmd = str_replace("\\","\",$cmd); rmdir ($cmd); therefor, it seems that he blocks the directorty with the opendir command, but don't set it free again with the closedir command. so i can't delete it. does anybody knows a solution ?

« previous php.notes (#8229) next »