Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-13 11:17:32
Original
1488 people have browsed it

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';
}

?>


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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!