is_executable() 函數(shù)檢查指定的文件是否可執(zhí)行。
is_executable(file)
參數(shù) | 描述 |
---|---|
file | 必需。規(guī)定要檢查的文件。 |
如果文件存在且可執(zhí)行,則返回 true。
注釋:本函數(shù)的結(jié)果會(huì)被緩存。請使用 clearstatcache() 來清除緩存。
注釋:is_executable() 自 PHP 5.0.0 版起可用于 Windows。
<?php $file = "setup.exe"; if(is_executable($file)) { echo ("$file is executable"); } else { echo ("$file is not executable"); } ?>
輸出:
setup.exe is executable
如對本文有疑問,請?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會(huì)為你解答??! 點(diǎn)擊進(jìn)入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號