PHP rmdir ()ฟังก์ชั่น
❮ การอ้างอิงระบบไฟล์ PHPตัวอย่าง
ลบไดเร็กทอรี "images":
<?php
$path = "images";
if(!rmdir($path)) {
echo ("Could not remove $path");
}
?>
ความหมายและการใช้งาน
ฟังก์ชัน rmdir() ลบไดเร็กทอรีว่าง
ไวยากรณ์
rmdir(dir, context)
ค่าพารามิเตอร์
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 |
รายละเอียดทางเทคนิค
คืนมูลค่า: | จริงกับความสำเร็จ เท็จเมื่อล้มเหลว |
---|---|
รุ่น PHP: | 4.0+ |
❮ การอ้างอิงระบบไฟล์ PHP