Check whether the specified filename is executable:
<?php
$file = "setup.exe";
if(is_executable($file)) {
echo ("$file is executable");
} else {
echo ("$file is not executable");
}
?>
The output of the code above could be:
setup.exe is executable
The is_executable() function checks whether the specified filename is executable.
Note: The result of this function is cached. Use clearstatcache() to clear the cache.
is_executable(
file)
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to check |
Return Value: | TRUE if the file is executable, FALSE and an E_WARNING on failure |
---|---|
PHP Version: | 4.0+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!