PHP is_executable() Function

PHP is_file() Function
PHP is_dir() Function

In this article, you will learn how to check if the file extension is .exe in PHP or not. The is_executable() function in PHP checks whether the specified filename is executable.

what is the syntax of the IS_EXECUTABLE function in php?

is_executable(file)
ParameterDescription
fileRequired. Specifies the path to the file to check
PHP is_executeable() method

examples of the IS_EXECUTABLE function

Example 1. In this example, we check whether the specified filename is executable.

<?php
$file = "setup.exe";
if(is_executable($file)) {
  echo ("$file is executable");
} else {
  echo ("$file is not executable");
}
?>
PHP is_file() Function
PHP is_dir() Function
en English
X
Scroll to Top