ฟังก์ชั่นไดเรกทอรี PHP
แนะนำไดเรกทอรี PHP
ฟังก์ชันไดเร็กทอรีช่วยให้คุณสามารถดึงข้อมูลเกี่ยวกับไดเร็กทอรีและเนื้อหาในไดเร็กทอรี
การติดตั้ง
ฟังก์ชันไดเร็กทอรี PHP เป็นส่วนหนึ่งของแกน PHP ไม่จำเป็นต้องติดตั้งเพื่อใช้ฟังก์ชันเหล่านี้
ฟังก์ชั่นไดเรกทอรี PHP
Function | Description |
---|---|
chdir() | Changes the current directory |
chroot() | Changes the root directory |
closedir() | Closes a directory handle |
dir() | Returns an instance of the Directory class |
getcwd() | Returns the current working directory |
opendir() | Opens a directory handle |
readdir() | Returns an entry from a directory handle |
rewinddir() | Resets a directory handle |
scandir() | Returns an array of files and directories of a specified directory |