is_executable() 函数检查指定的文件是否可执行。
is_executable(file)
参数 | 描述 |
---|---|
file | 必需。规定要检查的文件。 |
如果文件存在且可执行,则返回 true。
<?php
$file = "setup.exe";
if(is_executable($file))
{
echo ("$file is executable");
}
else
{
echo ("$file is not executable");
}
?>
输出:
setup.exe is executable
©2020 IT自习室京ICP备20010815号