PHP Directory Introduction PHP目录介绍
The directory functions allow you to retrieve information about directories and their contents. 目录函数用于获取目录及其内容的信息
Installation
The directory functions are part of the PHP core. There is no installation needed to use these functions. 本函数库作为 PHP 内核的一部分,不用安装就能使用。
PHP Directory Functions PHP目录函数
PHP: indicates the earliest version of PHP that supports the function. PHP:最早支持这些函数的PHP版本
|
Function 函数 |
Description 说明 |
PHP |
|---|---|---|
| chdir() | Changes the current directory 改变目录 | 3 |
| chroot() | Changes the root directory of the current process 改变根目录 | 4 |
| dir() | Opens a directory handle and returns an object directory 类 | 3 |
| closedir() | Closes a directory handle 关闭目录句柄 | 3 |
| getcwd() | Returns the current directory 取得当前工作目录 | 4 |
| opendir() | Opens a directory handle 打开目录句柄 | 3 |
| readdir() | Returns an entry from a directory handle 从目录句柄中读取条目 | 3 |
| rewinddir() | Resets a directory handle 倒回目录句柄 | 3 |
| scandir() | Lists files and directories inside a specified path 列出指定路径中的文件和目录 | 5 |
PHP Directory Constants PHP目录常量
PHP: indicates the earliest version of PHP that supports the constant. PHP:最早支持这些常量的PHP版本
| Constant 常量 | Description 说明 | PHP |
|---|---|---|
| DIRECTORY_SEPARATOR | 3 | |
| PATH_SEPARATOR | 4 |
热点搜索: php

