Re: Unix problem

From: Date: Sun, 20 May 2001 08:42:25 +0000
Subject: Re: Unix problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53593@lists.php.net to get a copy of this message
On Saturday 19 May 2001 14:22, Urb LeJeune wrote: > I'm using the follow snippet while traversing a directory. > > while ($Directory=readdir($DirHandle)) { > > $IsFile = is_file($Directory); > $IsDir = is_dir($Directory); > echo " is file=$IsFile - is dir=$IsDir\n"; > > Works fine on Windows box, on a Unix box (RedHat) both > is_file() and is_dir() return null no matter what the contents of > $Directory is. readdir returns the file/directory name without path, is_file and is_dir expect a complete filenam with path. So unless you only examine your current directory, is_file & is_dir won't find the files. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) I saw God --------- and she was black.

« previous php.general (#53593) next »