博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
readdir函数_PHP readdir()函数与示例
阅读量:2531 次
发布时间:2019-05-11

本文共 971 字,大约阅读时间需要 3 分钟。

readdir函数

PHP readdir()函数 (PHP readdir() function)

The full form of readdir is "Read Directory", the function readdir() is used to read the directory i.e. read the name of the next entry in the directory.

readdir的完整形式为“ Read Directory”函数readdir()用于读取目录,即读取目录中下一个条目的名称。

Syntax:

句法:

readdir(dir_handle);

Parameter(s):

参数:

  • dir_handle – it is an optional parameter which is used to specify the directory handle resource if we do not specify the directory handle resource – it assumes the last link opened with .

    dir_handle –是一个可选参数,如果我们未指定目录句柄资源,则用于指定目录句柄资源–假定使用打开的最后一个链接。

Return value:

返回值:

If the function execution is success – it returns the filename if the function execution is failed – it returns "FALSE".

如果函数执行成功–如果函数执行失败,则返回文件名–返回“ FALSE”。

Example: PHP code to open a directory, read its files, and close it

示例:PHP代码打开目录,读取其文件,然后关闭它

";    }    //closing the directory    readdir($dh);  }}?>

Output

输出量

File:..File:main.phpFile:.

Reference:

参考:

翻译自:

readdir函数

转载地址:http://jmxzd.baihongyu.com/

你可能感兴趣的文章
NSString的长度比较方法(一)
查看>>
Azure云服务托管恶意软件
查看>>
My安卓知识6--关于把项目从androidstudio工程转成eclipse工程并导成jar包
查看>>
旧的起点(开园说明)
查看>>
生产订单“生产线别”带入生产入库单
查看>>
crontab导致磁盘空间满问题的解决
查看>>
java基础 第十一章(多态、抽象类、接口、包装类、String)
查看>>
Hadoop 服务器配置的副本数量 管不了客户端
查看>>
欧建新之死
查看>>
自定义滚动条
查看>>
APP开发手记01(app与web的困惑)
查看>>
笛卡尔遗传规划Cartesian Genetic Programming (CGP)简单理解(1)
查看>>
mysql 日期时间运算函数(转)
查看>>
初识前端作业1
查看>>
为啥程序会有bug?
查看>>
跨域技术
查看>>
JS里的居民们7-对象和数组转换
查看>>
计算两个日期的时间间隔,返回的是时间间隔的日期差的绝对值.
查看>>
python初体验
查看>>
配置vue,vue脚手架的应用(老版本)
查看>>