★ wanayoo — archive 1999 http://uk.php.net/manual/ja/function.is-executable.phpNouvelle recherche | Portail wanayoo
PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<is_diris_file>
view the version of this page
Last updated: Thu, 21 Aug 2003

is_executable

(PHP 3, PHP 4 )

is_executable -- ファイルが実行可能かどうかを調べる

説明

bool is_executable ( string filename)

filenameが存在しかつ実行可能であれば TRUEを返します。

is_executable()は PHP version 5.0.0 においてWindows上でも使用可能になります

注意: この関数の結果は キャッシュされます。詳細は、clearstatcache() を参照 して下さい。

注意: この関数では、 リモートファイルを 使用することはできません。これは、処理されるファイルがサーバーの ファイルシステムによりアクセスできる必要があるためです。

is_file()およびis_link() も参照下さい。



add a note add a note User Contributed Notes
is_executable
david at littlesystems dot com dot au
02-Jun-2002 04: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.
drtebi at hotmail dot com
09-Feb-2001 01: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.

<is_diris_file>
 Last updated: Thu, 21 Aug 2003
show source | credits | sitemap | mirror sites 
Copyright © 2001-2003 The PHP Group
All rights reserved.
This mirror generously provided by: Kewlio.net Limited
Last updated: Wed Sep 24 16:11:25 2003 BST