is_executable
判斷給定文件名是否可執行
is_executable()
函數檢查指定的文件是否可執行。
<? php $ file = “ setup.exe” ; 如果( is_executable ( $ file ) ) { echo ( “ $ file是可執行的” ) ; } 別的 { echo ( “ $ file不可行” ) ; } ? >
輸出:
setup.exe是可執行的
is_executable ( file )
參數 | 描述 |
---|---|
file | 必需。規定要檢查的文件。 |
如果文件存在且可執行,則返回true。