note 11828 added to function.rmdir.php
| From: | php-general at lists dot php dot net | Date: | Thu, 08 Mar 2001 22:46:44 +0000 |
| Subject: | note 11828 added to function.rmdir.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-12083@lists.php.net to get a copy of this message | ||
I'm using PHP 4.0.2 under Windows NT running Apache. I was having the hardest time deleting
directories. I was a wreck -- thank God its all behind me now. (For some reason, 'rmdir( $dir
)' wasn't working.) This is the command I used, I hope that it will help you, too:
exec( "rmdir /s /q " . $dir );
It's not portable, but it will delete a directory and all its contents without asking for
confirmation. It's worth a try if nothing else is working.
http://www.php.net/manual/en/function.rmdir.php