PHP is_executable() 函數(shù)

PHP is_executable() 函數(shù)

PHP Filesystem 參考手冊 完整的 PHP Filesystem 參考手冊

定義和用法

is_executable() 函數(shù)檢查指定的文件是否可執(zhí)行。

如果文件可執(zhí)行,該函數(shù)返回 TRUE。

語法

is_executable(file)

參數(shù) 描述
file 必需。規(guī)定要檢查的文件。

提示和注釋

注釋:該函數(shù)的結果會被緩存。請使用 clearstatcache() 來清除緩存。

注釋:自 PHP 5.0 版本起,is_executable() 函數(shù)可用于 Windows。

實例

<?php
$file = "setup.exe";
if(is_executable($file))
{
echo ("$file is executable");
}
else
{
echo ("$file is not executable");
}
?>

上面的代碼將輸出:

setup.exe is executable

PHP Filesystem 參考手冊 完整的 PHP Filesystem 參考手冊
相關文章
亚洲国产精品第一区二区,久久免费视频77,99V久久综合狠狠综合久久,国产免费久久九九免费视频