PHP 4.0 Bug #8674 Updated: invallid filetype() results (affects isdir() )
| From: | cynic@php.net | Date: | Fri, 12 Jan 2001 15:30:16 +0000 |
| Subject: | PHP 4.0 Bug #8674 Updated: invallid filetype() results (affects isdir() ) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-43870@lists.php.net to get a copy of this message | ||
ID: 8674
Updated by: cynic
Reported By: yavo@itena.com.cy
Old-Status: Open
Status: Closed
Bug Type: Filesystem function related
Assigned To:
Comments:
a user error
Previous Comments:
---------------------------------------------------------------------------
[2001-01-12 09:58:24] yavo@itena.com.cy
im using php for shell scripting in redhat 6.2. compiled with
'./configure' '--with-apxs=/usr/local/apache/bin/apxs'
'--with-oci8=/usr/local/oracle'
trying to get the filetype files returns null for all entries exsept . and .. .
-- code snippet --
$dp = opendir($dir);
if($dp){
while (($file = readdir($dp))!== false) {
// Skip . and .. and check for type
// tried with this on and both here and at the start
clearstatcache();
print($file." - ".filetype($file)."n");
if(($file != ".") && ($file != "..") && (filetype($file)
== $type)){
$files[] = $file;
}
}//while
return($files);
}//if
else{
debug("The directory [$dir] was not found or couldn't be opened");
write_log("The directory [$dir] was not found or couldn't be opened");
return(0);
}
-- end of snippet ---------------------------------
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8674