PHP is_executable()函数 is_executable()函数可以检查指定的文件是否可执行。如果文件可执行,该函数可以返回true。 语法 bool is_executable ( string $filename )PHPCopy 这个函数可以判断文件名是否可执行。 示例 <?php file = "/PhpProject/setup.exe"; if(is_executable(file)) { echo file." is executable"; } else { echofile." is not executable"; } ?>PHPCopy 输出 /PhpProject/setup.exe is executablePHPCopy