• PHP Video Tutorials

PHP - Function is_executable()



The is_executable() function can check whether the specified file is executable. This function can return true if the file is executable.

Syntax

bool is_executable ( string $filename )

This function can tell whether the filename is executable.

Example

<?php
   $file = "/PhpProject/setup.exe";

   if(is_executable($file)) {
      echo $file." is executable";
   } else {
      echo $file." is not executable";
   }
?>

Output

/PhpProject/setup.exe is executable
php_function_reference.htm
Advertisements