php is_executable Determine whether a file is an executable file_PHP tutorial

WBOY
Release: 2016-07-20 11:00:58
Original
1291 people have browsed it

php is_executable determines whether the file is an executable file ​

is_executable
(PHP 4, PHP 5)

is_executable - tells whether the file name is executable

Description
boolean is_executable (string $filename)
Tells whether filename is an executable file.

Parameters

File name
File path.


Return value
Returns TRUE if the file exists and is executable, or FALSE on error.

Modify

Release Notes
5.0.0 is_executable() becomes available with Windows


Example

Example #1 is_executable() example

$file = '/home/vincent/somefile.sh';

if (is_executable($file)) {
echo $file.' is executable';
} else {
echo $file.' is not executable';
}

?>


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445462.htmlTechArticlephp is_executable determines whether the file is executable is_executable (PHP 4, PHP 5) is_executable - tells whether it is executable Executable file name description Boolean is_executable (String $text...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template