當前位置: 首頁> 函數類別大全> 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
同類函數
  • 檢查文件或目錄是否存在 file_exists

    file_exists

    檢查文件或目錄是否存在
  • 參見unlink() 或unset()(PHP 沒有delete 關鍵詞或函數) delete

    delete

    參見unlink()或unset()(P
  • 把整個文件讀入一個數組中 file

    file

    把整個文件讀入一個數組中
  • 打開進程文件指針 popen

    popen

    打開進程文件指針
  • 建立一個硬連接 link

    link

    建立一個硬連接
  • 修改符號鏈接的所有組 lchgrp

    lchgrp

    修改符號鏈接的所有組
  • 獲取文件類型 filetype

    filetype

    獲取文件類型
  • 將緩衝內容輸出到文件 fflush

    fflush

    將緩衝內容輸出到文件