fopen() 函数
直接打开文件
例
代码如下 | 复制代码 |
$file = "111.txt"; |
file_get_contents() 函数把整个文件读入一个字符串中
例子
代码如下 | 复制代码 |
echo file_get_contents("test.txt"); 输出: This is a test file with test text. |
php读取本地文件夹文件
代码如下 | 复制代码 |
$dir = opendir('/movie'); ?> |