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

is_executable

判斷給定文件名是否可執行
名稱:is_executable
分類:文件系統
所屬語言:php
一句話介紹:判斷文件是否可執行。

定義和用法

is_executable()函數檢查指定的文件是否可執行。

實例

<? php
$ file = “ setup.exe” ;
如果( is_executable ( $ file ) )
  {
  echo ( “ $ file是可執行的” ) ;
  }
別的
  {
  echo ( “ $ file不可行” ) ;
  }
? >

輸出:

 setup.exe是可執行的

文法

is_executable ( file )
參數 描述
file 必需。規定要檢查的文件。

說明

如果文件存在且可執行,則返回true。

同類函數
  • 更改當前的umask umask

    umask

    更改當前的umask
  • 取得文件的組 filegroup

    filegroup

    取得文件的組
  • 在文件指針中定位 fseek

    fseek

    在文件指針中定位
  • 獲取文件所有者 fileowner

    fileowner

    獲取文件所有者
  • 用模式匹配文件名 fnmatch

    fnmatch

    用模式匹配文件名
  • 清除文件狀態緩存 clearstatcache

    clearstatcache

    清除文件狀態緩存
  • disk_free_space 的別名 diskfreespace

    diskfreespace

    disk_free_space的別名
  • 關閉一個已打開的文件指針 fclose

    fclose

    關閉一個已打開的文件指針
熱門文章