★ wanayoo — archive 1999 http://fr.php.net/manual/fi/function.is-executable.phpNouvelle recherche | Portail wanayoo
PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousis_diris_filenext
Last updated: Tue, 28 May 2002
view the printer friendly version or the printer friendly version with notes or change language to English | Brazilian Portuguese | Czech | Dutch | French | German | Hungarian | Italian | Japanese | Korean | Polish | Romanian | Russian | Slovak | Spanish | Swedish | Turkish

is_executable

(PHP 3, PHP 4 >= 4.0.0)

is_executable -- Tells whether the filename is executable

Description

bool is_executable ( string filename)

Returns TRUE if the filename exists and is executable.

The results of this function are cached. See clearstatcache() for more details.

This function will not work on remote files; the file to be examined must be accessible via the server's filesystem.

See also is_file() and is_link().

User Contributed Notes
is_executable
add a note about notes
drtebi at hotmail dot com
09-Feb-2001 03:12

[Editor's Note: This is the expected behavior (at least on most Unix-like systems).  If a directory is not executable, then you cannot get details on the files in the directory - this includes the permissions.

--zak@php.net]

This does not work on directories!
look at this example:

if(is_file("foo/bar"))
 print "found it";

if "bar" exists, but directory "foo" is not executable, you will NOT get "found it" as result.

david at littlesystems dot com dot au
02-Jun-2002 06:38

to test whether the directory /home/david is executable (regardless of whether it is readable or writeable), issue the command:
$my_isWriteable = @file_exists("/home/david/.")

the @ gets rid of the warning when this command fails when the directory is not executable.

add a note about notes
previousis_diris_filenext
Last updated: Tue, 28 May 2002
show source | credits | stats | mirror sites
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: nexen.net
Last updated: Sat Nov 23 04:10:11 2002 CET