#23722 [Opn->Bgs]: with dir() is_file() return always false ...

From: Date: Tue, 20 May 2003 21:49:35 +0000
Subject: #23722 [Opn->Bgs]: with dir() is_file() return always false ...
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40090@lists.php.net to get a copy of this message
ID: 23722 Updated by: nicos@php.net Reported By: ca533512 at tiscali dot cz -Status: Open +Status: Bogus Bug Type: *Directory/Filesystem functions Operating System: win2k SP3 PHP Version: 4.3.2RC3 New Comment: Yes, it is an expected feature. You have to do if(is_file('images/php/'.$file)). dir() will not chdir so when you call is_file it tries to see if $file is present in your current directory. Not a bug -> Bogus. Previous Comments: ------------------------------------------------------------------------ [2003-05-20 13:30:47] ca533512 at tiscali dot cz I want to read a dir with dir() function and dir to open is like "images/php" then is_file() function doesn't working correctly ... (return false or NULL) code: $d = dir("images/php"); while ($file = $d -> read()) { if (is_file($file)) { // <- this line always return false ... } } when i use chdir() function to change directory, all working correctly ... Must I use chdir() func. ??? is this a regular feature ??? jenik ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23722&edit=1

« previous php.bugs (#40090) next »