note 88479 modified in function.rmdir by thiago
| From: | thiago@php.net | Date: | Mon, 26 Jan 2009 16:03:22 +0000 |
| Subject: | note 88479 modified in function.rmdir by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-149782@lists.php.net to get a copy of this message | ||
Usually, the easiest thing are best:
<?php
function removeDir( $dir ) {
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
exec( "rd /s $dir" );
} else {
exec( "rm -rf $dir" )
}
}
?>
--was--
Usually, the easiest thing are best:
function removeDir( $dir ) {
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
exec( "rd /s $dir" );
} else {
exec( "rm -rf $dir" )
}
}
http://php.net/manual/en/function.rmdir.php