|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-05-31 09:58 UTC] rac at whitestein dot com
$dh = opendir( "xxx" );
while( ($file = readdir( $dh )) !== false )
{
// code
}
closedir( $dh );
rmdir( "xxx" );
---------------
Produces permission denied on WIN NT4.0. Sorry, I did not have time to check it out in new release of PHP (I'm using 4.0.3pl1) or under LINUX.
The workaround I foud out to be working was this (looks like a problem of internal management of handles???):
---------------
$dh = opendir( "xxx" );
while( ($file = readdir( $dh )) !== false )
{
// code
}
closedir( $dh );
unset( $dh );
rmdir( "xxx" );
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 16:00:01 2025 UTC |
$dh = opendir( "xxx" ); while( ($file = readdir( $dh )) !== false ) { // code } closedir( $dh ); rmdir( "xxx" ); --------------- Produces permission denied on WIN NT4.0. The command which actually ends up with permission denied is the rmdir() which should delete the directory. Sorry, I did not have time to check it out in new release of PHP (I'm using 4.0.3pl1) or under LINUX. The workaround I foud out to be working was this (looks like a problem of internal management of handles???): --------------- $dh = opendir( "xxx" ); while( ($file = readdir( $dh )) !== false ) { // code } closedir( $dh ); unset( $dh ); rmdir( "xxx" );$dh = opendir( "xxx" ); while( ($file = readdir( $dh )) !== false ) { // code } closedir( $dh ); rmdir( "xxx" ); --------------- Produces permission denied on WIN NT4.0. The command which actually ends up with permission denied is the rmdir() which should delete the directory. Sorry, I did not have time to check it out in new release of PHP (I'm using 4.0.3pl1) or under LINUX. The workaround I foud out to be working was this (looks like a problem of internal management of handles???): --------------- $dh = opendir( "xxx" ); while( ($file = readdir( $dh )) !== false ) { // code } closedir( $dh ); unset( $dh ); rmdir( "xxx" );