Menu Home

rmdir

osbo.com | PHP | Functions | rmdir

Removes directory

Syntax

rmdir ( string $dirname [, resource $context ] ) : bool

Parameters

dirname

Path to the directory.

context

Note: Context support was added with PHP 5.0.0. For a description of contexts, refer to Streams.

Return

Returns TRUE on success or FALSE on failure.

Examples

<?

if (!is_dir('examples')) {
    mkdir('examples');
}

rmdir('examples');

?>

			
			
		

PHP