php is_executable函数用于检查指定的文件是否可执行,其语法是is_executable(file),参数file是必需的,指规定要检查的文件。

php is_executable函数怎么用-LMLPHP

php is_executable函数怎么用?

作用:检查指定的文件是否可执行。

语法:

is_executable(file)
登录后复制

参数:

file 必需。规定要检查的文件。

说明:

如果文件存在且可执行,则返回 true。

php is_executable()函数使用示例

<?php
$file = is_executable("./test.txt");
if($file == 1)
{
    echo "该文件是可执行的";
}else{
    echo "该文件不可执行";
}
?>
登录后复制

以上就是php is_executable函数怎么用的详细内容,更多请关注Work网其它相关文章!

09-01 06:30