当前位置: 首页> 函数类别大全> 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
同类函数
  • 打开文件或 URL  fopen

    fopen

    打开文件或URL
  • 打开进程文件指针  popen

    popen

    打开进程文件指针
  • 同步对文件的更改(包括元数据)  fsync

    fsync

    同步对文件的更改(包括元数据)
  • 将文件截断到给定的长度  ftruncate

    ftruncate

    将文件截断到给定的长度
  • 获取文件类型  filetype

    filetype

    获取文件类型
  • 判断给定的文件名是否可写  is_writable

    is_writable

    判断给定的文件名是否可写
  • 修改符号链接的所有者  lchown

    lchown

    修改符号链接的所有者
  • 通过已打开的文件指针取得文件信息  fstat

    fstat

    通过已打开的文件指针取得文件信息
热门文章