当前位置: 首页> 函数类别大全> readfile

readfile

输出文件
名称:readfile
分类:文件系统
所属语言:php
一句话介绍:读取一个文件,并输出到输出缓冲。

实例

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">readfile</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"test.txt"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

输出:

There are two lines in this file.
This is the last line.
57
同类函数
  • 拷贝文件  copy

    copy

    拷贝文件
  • 解析一个配置文件  parse_ini_file

    parse_ini_file

    解析一个配置文件
  • 通过已打开的文件指针取得文件信息  fstat

    fstat

    通过已打开的文件指针取得文件信息
  • 给出一个文件或符号连接的信息  lstat

    lstat

    给出一个文件或符号连接的信息
  • 轻便的咨询文件锁定  flock

    flock

    轻便的咨询文件锁定
  • 寻找与模式匹配的文件路径  glob

    glob

    寻找与模式匹配的文件路径
  • 修改符号链接的所有者  lchown

    lchown

    修改符号链接的所有者
  • 从文件指针中读入一行并解析 CSV 字段  fgetcsv

    fgetcsv

    从文件指针中读入一行并解析CSV字段
热门文章