Funkce PHP rmdir() .
❮ Reference souborového systému PHPPříklad
Odebrat adresář "images":
<?php
$path = "images";
if(!rmdir($path)) {
echo ("Could not remove $path");
}
?>
Definice a použití
Funkce rmdir() odstraní prázdný adresář.
Syntax
rmdir(dir, context)
Hodnoty parametrů
Parameter | Description |
---|---|
dir | Required. Specifies the path to the directory to be removed |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |
Technické údaje
Návratová hodnota: | PRAVDA při úspěchu, NEPRAVDA při neúspěchu |
---|---|
Verze PHP: | 4,0+ |
❮ Reference souborového systému PHP