The PHP is_executable function is used to determine whether a file can be executed, if the file exists and the executable returns TRUE, the error returns false, this article introduces the basic syntax and usages of the is_executable function.
Introduction to PHP is_executable functions
The Is_executable function is used to determine whether a given file name is executable
Grammar:
BOOL Is_executable (String $filename)
Determines whether the given file name can be executed.
Parameters:
The path to the filename file.
return value:
Returns TRUE if the file exists and can be executed, false when the error is returned.
PHP is_executable Function Instance
Use is_executable to determine if the permissions.php file can be executed with the following code:
<?php$file_name= "permissions.php"; Only works on Windows with PHP 5.0.0 or Laterif (is_executable ($file _name)) { echo ("The file $file _name is executabl e.<br/> ");} else { echo ("The file $file _name is not executable.<br/>");}? >
The above is the PHP is_executable to determine whether the given file name can be executed data collation, follow-up continue to supplement the relevant information, thank you for the support of this site!