Remember that the owner of the directory has to be the same of the script user, otherwise this function will always return false when PHP is running in safe_mode..
![]() | is_dir说明bool is_dir ( string filename )如果文件名存在并且为目录则返回 TRUE。如果 filename 是一个相对路径,则按照当前工作目录检查其相对路径。
![]()
dmertens-php-note at zyprexia dot com
24-Sep-2005 11:53
Remember that the owner of the directory has to be the same of the script user, otherwise this function will always return false when PHP is running in safe_mode..
fanfatal at fanfatal dot pl
03-Jul-2005 12:04
Hi
07-Jun-2005 02:30
With error reporting set to all, and you attempt to do:
akashif at freezone dot co dot uk
03-Jun-2005 07:50
just a simple script to for those who dont have the IIS or Apache Dirlisting available , this will make onr for you
renich at woralelandia dot com
22-Apr-2005 02:45
Here goes a PHP5.0 link-to-directory listing function and examples
dusted19 at hotmail dot com
20-Mar-2005 06:38
While working on a php project (my first one =( ). I ran into a bug using is_dir() on my winxp w/ servicepack 2 system. I'm using php 4.3.10.. the problem is whenever i pass is_dir() a pathname that is longer then 256 characters long it will ALWAYS return true.
flobee
14-Mar-2005 10:13
note: like the main example already shows. tooks me houres to understand und using chdir() to get a full dir scann (especilly on windows and "mounted" network drives)
puremango dot co dot uk at gmail dot com
09-Feb-2005 03:55
this function bypasses open_basedir restrictions.
03-Feb-2005 08:12
Unfortunately, the function posted by p dot marzec at bold-sg dot pl does not work.
tibard at gmail dot com
02-Feb-2005 04:32
use this function to get all files inside a directory (including subdirectories)
rchavezc at ameritech dot net
13-Dec-2004 12:19
This is the function that I use to test for an empty directory:
bhuskins at nospam dot christian-horizons dot org
13-Aug-2004 04:51
'Is_empty_folder' posted by andreas at rueping dot net is a nice function. It did give me some grief, though. I don't beleive that it actually closes the directory when it's done (closedir in the wrong spot). I changed it slightly to be the following:
sly at noiretblanc dot org
29-May-2004 01:10
This is the "is_dir" function I use to solve the problems :
p dot marzec at bold-sg dot pl
14-Mar-2004 11:33
Simplest version 'is_empty_folder' posted by andreas at rueping dot net
andreas at rueping dot net
24-Sep-2003 08:29
function checks if a folder is empty or not. Retruns "true" if it is empty and "false" if it is full with data. Also if the folder doesnt even exist, function returns "true". | ![]() | |