PHP rmdir() Functie
❮ Referentie voor PHP-bestandssysteemVoorbeeld
Verwijder de map "afbeeldingen":
<?php
$path = "images";
if(!rmdir($path)) {
echo ("Could not remove $path");
}
?>
Definitie en gebruik
De functie rmdir() verwijdert een lege map.
Syntaxis
rmdir(dir, context)
Parameterwaarden
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 |
Technische details
Winstwaarde: | WAAR bij succes, ONWAAR bij mislukking |
---|---|
PHP-versie: | 4.0+ |
❮ Referentie voor PHP-bestandssysteem