English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The is_executable() function can check whether the specified file is executable. If the file is an executable file, this function can return true.
bool is_executable ( string $filename )
This function can determine whether a file name is executable.
<?php $file = "/PhpProject/setup.exe"; if(is_executable($file)) { echo $file." is executable"; } else { echo $file." is not executable"; } ?>
Output Result
/PhpProject/setup.exe is executablePHP Filesystem Reference Manual