How to use Filesystem is executable in PHP

In this article I am going to explain about is_executable function in PHP.
  • 1238

PHP is_executable() Function

The filesystem is_executable function checks whether the given file is executable or not. The function returns true on success.

Syntax of is_executable function

is_executable(file,)

Parameters in is_executable function

It has only parameter:

Parameter Description
file It specifies the file to check.

Example of filesystem is_executable function

<html>

<body>

 

<?php

$file = "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\bscmake.exe";

if(is_executable($file))

  {

  echo ("$file is executable");

  }

else

  {

  echo ("$file is not executable");

  }

?>

 

</body>

</html>

 

Output:

isexecutablefunctionphp.jpg

You may also want to read these related articles :
here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.