|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-20 12:36 UTC] sniper@php.net
[2001-01-18 21:24 UTC] sniper@php.net
[2001-02-20 07:53 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 03:00:01 2025 UTC |
the following sequence fails at rmdir() with permission denied as long as we uncomment the $d-part. Wa are not very shure if it's a problem of the code somehow or a bug. Thanks for any answers. /* $d = dir( "./temp/sess_".session_id() ); while( $entry = $d->read() ) { if ( $entry != "" && $entry != "." && $entry != ".." ) { $fn = $d->path."/".$entry; unlink( $fn ); } } $d->close(); echo "all files deleted <br>"; */ $canonical_dir = str_replace( "\\", "/", $PATH_TRANSLATED ); $canonical_dir = substr( $canonical_dir, 0, strrpos( $canonical_dir, "/" ) ); $canonical_dir = $canonical_dir."/temp/sess_".session_id(); echo "dirname : " . $canonical_dir . "<br>"; rmdir( $canonical_dir ); echo "directory removed <br>";