Home  >  Article  >  php教程  >  php is_executable 判断文件是可执行文件

php is_executable 判断文件是可执行文件

WBOY
WBOYOriginal
2016-06-13 11:17:321463browse

php is_executable 判断文件是可执行文件  

is_executable
( PHP 4中, PHP 5中)

is_executable -告诉是否是可执行文件名

描述
布尔is_executable (字符串$文件名)
告诉是否filename是可执行文件。

参数

文件名
文件路径。


返回值
返回TRUE ,如果文件存在且可执行,或FALSE的错误。

修改

版本说明
5.0.0 is_executable ( )成为可与Windows


实例

例如# 1 is_executable ( )的例子

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

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

?>


Statement:
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