PHP/File Directory/is executable

Материал из Web эксперт
Перейти к: навигация, поиск

is_executable

 
<?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.<br />");
}
else {
    echo ("The file $file_name is not executable.<br />");
}
?>



is_executable() tells you whether you can run a file

 
<?
if ( is_executable( "test.txt" ) {
  print "test.txt is executable";
}
?>