PHP/File Directory/is executable — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 13:37, 26 мая 2010
is_executable
<source lang="html4strict">
<?php $file_name="permissions.php"; //Only works on Windows with PHP 5.0.0 or later if(is_executable($file_name)) {
echo ("The file $file_name is executable.
");
} else {
echo ("The file $file_name is not executable.
");
} ?>
</source>
is_executable() tells you whether you can run a file
<source lang="html4strict">
<? if ( is_executable( "test.txt" ) {
print "test.txt is executable";
} ?>
</source>