PHP Filesystem 函数
is_executable() 函数检查指定的文件是否可执行。
</>codeis_executable(file)
如果文件存在且可执行,则返回 true。
注释:本函数的结果会被缓存。请使用 clearstatcache() 来清除缓存。
注释:is_executable() 自 PHP 5.0.0 版起可用于 Windows。
</>code<?php$file = "setup.exe";if(is_executable($file)) { echo ("$file is executable"); }else { echo ("$file is not executable"); }?>
输出:
</>codesetup.exe is executable
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛