Funkcja PHP rmdir()
❮ Dokumentacja systemu plików PHPPrzykład
Usuń katalog "images":
<?php
$path = "images";
if(!rmdir($path)) {
echo ("Could not remove $path");
}
?>
Definicja i użycie
Funkcja rmdir() usuwa pusty katalog.
Składnia
rmdir(dir, context)
Wartości parametrów
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 |
Szczegóły techniczne
Wartość zwrotu: | TRUE w przypadku sukcesu, FALSE w przypadku porażki |
---|---|
Wersja PHP: | 4.0+ |
❮ Dokumentacja systemu plików PHP