PHP mkdir()ฟังก์ชัน
❮ การอ้างอิงระบบไฟล์ PHPตัวอย่าง
สร้างไดเร็กทอรีชื่อ "test":
<?php
mkdir("test");
?>
ความหมายและการใช้งาน
ฟังก์ชัน mkdir() สร้างไดเร็กทอรีที่ระบุโดยชื่อพาธ
ไวยากรณ์
mkdir(path, mode, recursive, context)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
path | Required. Specifies the directory path to create |
mode | Optional. Specifies permissions. By default, the mode is 0777 (widest possible access). Note: The mode parameters is ignored on Windows platforms! The mode parameter consists of four numbers:
Possible values (to set multiple permissions, add up the following numbers):
|
recursive | Optional. Specifies if the recursive mode is set (added in PHP 5) |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream (added in PHP 5) |
รายละเอียดทางเทคนิค
คืนมูลค่า: | จริงกับความสำเร็จ เท็จเมื่อล้มเหลว |
---|---|
รุ่น PHP: | 4.0+ |
❮ การอ้างอิงระบบไฟล์ PHP