php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8674 invallid filetype() results (affects isdir() )
Submitted: 2001-01-12 09:58 UTC Modified: 2001-01-12 10:30 UTC
From: yavo at itena dot com dot cy Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4 OS: redhat 6.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: yavo at itena dot com dot cy
New email:
PHP Version: OS:

 

 [2001-01-12 09:58 UTC] yavo at itena dot com dot 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 ---------------------------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-12 10:30 UTC] cynic@php.net
a user error
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC