當前位置: 首頁> 函數類別大全> 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
同類函數
  • 判斷給定文件名是否為一個正常的文件 is_file

    is_file

    判斷給定文件名是否為一個正常的文件
  • 建立一個硬連接 link

    link

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

    lchgrp

    修改符號鏈接的所有組
  • 獲取realpath 緩存條目 realpath_cache_get

    realpath_cache_get

    獲取realpath緩存條目
  • 輸出文件指針處的所有剩餘數據 fpassthru

    fpassthru

    輸出文件指針處的所有剩餘數據
  • 判斷給定文件名是否可執行 is_executable

    is_executable

    判斷給定文件名是否可執行
  • 返回文件系統或磁盤分區上的可用空間 disk_free_space

    disk_free_space

    返回文件系統或磁盤分區上的可用空間
  • 將文件截斷到給定的長度 ftruncate

    ftruncate

    將文件截斷到給定的長度