PHP의 is_executable () 함수
정의 및 사용
() 함수는 지정된 실행 파일을 확인 is_executable 있습니다.
실행 파일 경우, 함수는 TRUE를 반환합니다.
문법
is_executable(file)
参数 | 描述 |
---|---|
file | 必需。规定要检查的文件。 |
팁과주의 사항
참고 :이 함수의 결과는 캐시됩니다.캐시를 지우려면 싶으면 clearstatcache ()를 사용합니다.
참고 : PHP에서 5.0 버전을 시작, is_executable () 함수는 Windows에서 사용할 수 있습니다.
예
<?php
$file = "setup.exe";
if(is_executable($file))
{
echo ("$file is executable");
}
else
{
echo ("$file is not executable");
}
?>
$file = "setup.exe";
if(is_executable($file))
{
echo ("$file is executable");
}
else
{
echo ("$file is not executable");
}
?>
가 출력 위의 코드 :
setup.exe is executable
PHP 파일 시스템 참조 설명서를 완료