is_executable
(PHP 4, PHP 5)
is_executable — Zegt of een bestandsnaam een executable is
Beschrijving
bool is_executable
( string $filename
)
Geeft TRUE terug als de bestandsnaam bestaat en een executable is.
Vanaf PHP 5.0.0 is is_executable() bruikbaar onder Windows.
Example#1 is_executable() voorbeeld
<?php
$file = '/home/vincent/somefile.sh';
if(is_executable($file)) {
echo $file.' is executable';
} else {
echo $file.' is not executable';
}
?>
Note: The results of this function are cached. See clearstatcache() for more details.
Note: This function will not work on remote files as the file to be examined must be accessible via the servers filesystem.