RE: [PHP-DEV] PHP 4.0 Bug #8674: invallid filetype() results (affects isdir() )

From: Date: Fri, 12 Jan 2001 14:59:23 +0000
Subject: RE: [PHP-DEV] PHP 4.0 Bug #8674: invallid filetype() results (affects isdir() )
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-43868@lists.php.net to get a copy of this message
Thats because you need to pass a valid filename to filetype(). PHP is trying to find $file in its current directory even if $dir is /usr/local/not/phps/current/dir. I have fixed your example below. (Note that this still won't work if the last character of $dir is not a '/', so append one where necessary) (I think this bug can be closed also.) Sean ====================================== Sean Bright elixer@erols.com / sean@seanbright.com ====================================== > ... > // tried with this on and both here and at the start > clearstatcache(); // UPDATED : Try this print($file." - ".filetype($dir . $file)."\n"); // Notice the concatenation. > if(($file != ".") && ($file != "..") && > ...

« previous php.dev (#43868) next »