當前位置: 首頁> 函數類別大全> file

file

把整個文件讀入一個數組中
名稱:file
分類:文件系統
所屬語言:php
一句話介紹:把文件讀入一個數組中。

實例

<span class="token php language-php"><span class="token delimiter important"><? php</span>
<span class="token function">print_r</span> <span class="token punctuation">(</span> <span class="token function">file</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 punctuation">;</span>
<span class="token delimiter important">? ></span></span>

輸出:

大批
((
[0] => Hello World。測試測試!
[1] =>另一天,另一行。
[2] =>如果陣列拾取了這一行,
[3] =>那是拾音器線嗎?
)
同類函數
  • 修改符號鏈接的所有組 lchgrp

    lchgrp

    修改符號鏈接的所有組
  • 從文件指針中讀入一行並解析CSV 字段 fgetcsv

    fgetcsv

    從文件指針中讀入一行並解析CSV字段
  • 獲取文件大小 filesize

    filesize

    獲取文件大小
  • 返回文件指針讀/寫的位置 ftell

    ftell

    返回文件指針讀/寫的位置
  • 改變文件所屬的組 chgrp

    chgrp

    改變文件所屬的組
  • 獲取文件類型 filetype

    filetype

    獲取文件類型
  • 取得文件的組 filegroup

    filegroup

    取得文件的組
  • 返回文件系統或磁盤分區的總大小 disk_total_space

    disk_total_space

    返回文件系統或磁盤分區的總大小