English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

Usage and Examples of PHP is_executable() Function

PHP Filesystem Reference Manual

The is_executable() function can check whether the specified file is executable. If the file is an executable file, this function can return true.

Syntax

bool is_executable ( string $filename )

This function can determine whether a file name is executable.

Online Example

<?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 executable
PHP Filesystem Reference Manual