★ wanayoo — archive 1999 http://www.php.net/manual/function.is-readable.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Filesystem
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
Filesystem
* basename
* chgrp
* chmod
* chown
* clearstatcache
* copy
* delete
* dirname
* diskfreespace
* fclose
* feof
* fgetc
* fgetcsv
* fgets
* fgetss
* file
* file_exists
* fileatime
* filectime
* filegroup
* fileinode
* filemtime
* fileowner
* fileperms
* filesize
* filetype
* flock
* fopen
* fpassthru
* fputs
* fread
* fscanf
* fseek
* fstat
* ftell
* ftruncate
* fwrite
* set_file_buffer
* is_dir
* is_executable
* is_file
* is_link
* is_readable
* is_writeable
* link
* linkinfo
* mkdir
* pclose
* popen
* readfile
* readlink
* rename
* rewind
* rmdir
* stat
* lstat
* realpath
* symlink
* tempnam
* touch
* umask
* unlink
Manual: is_readable
View the source code for this pageSearch the site



Previous page
 is_link
 Updated
Sat, 12 Aug 2000
is_writeable 
Next page


is_readable

(PHP3 , PHP4 )

is_readable --  Tells whether the filename is readable

Description

bool is_readable (string filename)

Returns true if the filename exists and is readable.

Keep in mind that PHP may be accessing the file as the user id that the web server runs as (often 'nobody'). Safe mode limitations are not taken into account.

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

See also is_writeable().


User Contributed Notes: is_readable


cdi@thewebmasters.net
07-Jan-1999 02:27
Quirk: is-readable returns true if the file has the user-read bit set, regardless if the process can actually read the file or not.

Example:
File (user/group 500/500)
PHP Process running as (99/99)

-rw-r--r-- is_readable returns true
-rw------- is_readable returns true(!?)
--w-r--r-- is_readable returns false(!?)

Same problem with is_writable. These two functions return completely useless information. <B>is_readable</B> cannot be trusted to return correct information! Use <B>stat</B> or <B>fileperms</B> and do the work youself.

CDI



hartmut@six.de
07-Mar-2000 08:27
help is on the way, see bug id #3753


 About Notes


Previous page
 is_link
 Updated
Sat, 12 Aug 2000
is_writeable 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.