php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #237 misleading filetype() info
Submitted: 1998-04-03 09:12 UTC Modified: 1999-06-12 16:11 UTC
From: sbedberg at ucdavis dot edu Assigned:
Status: Closed Package: Other
PHP Version: 3.0b4 OS: WinNT 4.0
Private report: No CVE-ID: None
 [1998-04-03 09:12 UTC] sbedberg at ucdavis dot edu
I ran the test script below on a directory, producing the
following result:

   . (dir)
   .. (dir)
   ECOLOGY 
   EHWEB 
   LINES 
   LogFiles 
   OHRIC 
   PHP 
   Scripts 
   TREEFAIL

The problem is, ALL of the entries are directories;
filetype() doesn't seem to recognize this for directories
other than '.' and '..'. It seems to recognize files OK.
If it matters, this is on an NTFS volume, and I'm running
Internet Info Server 3.0.

Has this been fixed since 3.0b4 (I'm 93.124% sure that's
what I have; php.exe is dated 2/11/98 1:27:58am, at 399872
bytes)? I haven't been downloading the latest versions in
anticipation of 3.0 final release.

TEST SCRIPT:
   <?
   $dh=opendir('F:\!web');
   while ($fname=readdir($dh))
      { echo "$fname (", filetype($fname), ")<BR>"; }
   closedir($dh);
   ?>

Thanks!

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 12:01:31 2024 UTC