THE WORLD'S LARGEST WEB DEVELOPER SITE

PHP is_executable() Function


PHP Filesystem Reference Complete PHP Filesystem Reference

Definition and Usage

The is_executable() function checks whether the specified file is executable.

This function returns TRUE if the file is executable.

Syntax

is_executable(file)

Parameter Description
file Required. Specifies the file to check

Tips and Notes

Note: The result of this function are cached. Use clearstatcache() to clear the cache.

Note: The is_executable() function became available with Windows in PHP 5.0


Example

<?php
$file = "setup.exe";
if(is_executable($file))
  {
  echo ("$file is executable");
  }
else
  {
  echo ("$file is not executable");
  }
?>

The output of the code above could be:

setup.exe is executable

PHP Filesystem Reference Complete PHP Filesystem Reference

COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: