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

filetype

獲取文件類型
名稱:filetype
分類:文件系統
所屬語言:php
一句話介紹:返回文件類型。

實例

例子1

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">filetype</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>

輸出:

 file

例子2

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

輸出:

 dir
同類函數
  • 從文件指針中讀取一行並過濾掉HTML 標記 fgetss

    fgetss

    從文件指針中讀取一行並過濾掉HTML標記
  • 將整個文件讀入一個字符串 file_get_contents

    file_get_contents

    將整個文件讀入一個字符串
  • 返回文件系統或磁盤分區的總大小 disk_total_space

    disk_total_space

    返回文件系統或磁盤分區的總大小
  • 從文件指針中讀取一行 fgets

    fgets

    從文件指針中讀取一行
  • 將數據(但不是元數據)同步到文件 fdatasync

    fdatasync

    將數據(但不是元數據)同步到文件
  • 通過已打開的文件指針取得文件信息 fstat

    fstat

    通過已打開的文件指針取得文件信息
  • 更改文件所有者 chown

    chown

    更改文件所有者
  • 返回規範化的絕對路徑名 realpath

    realpath

    返回規範化的絕對路徑名