PHP rmdir() Fungsi
Referensi Sistem File PHPContoh
Hapus direktori "gambar":
<?php
$path = "images";
if(!rmdir($path)) {
echo ("Could not remove $path");
}
?>
Definisi dan Penggunaan
Fungsi rmdir() menghapus direktori kosong.
Sintaksis
rmdir(dir, context)
Nilai Parameter
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 |
Detail Teknis
Nilai Kembali: | BENAR pada keberhasilan, SALAH pada kegagalan |
---|---|
Versi PHP: | 4.0+ |
Referensi Sistem File PHP