php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5693 is_dir, is_file and filetype do not work
Submitted: 2000-07-20 13:10 UTC Modified: 2000-08-01 05:37 UTC
From: mclion at obala dot net Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1pl2 OS: Win32/Unix
Private report: No CVE-ID: None
 [2000-07-20 13:10 UTC] mclion at obala dot net
is_dir returns dir only for "." and ".." directories in a tree, is_file returns true even for directories and filetype returns void for directories.

$handle=opendir(".");
while($file = readdir($handle)) {
if(is_dir($file)) {
     echo "dir = $file";
} else { 
     echo "file = $file";
} 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-21 17:55 UTC] hholzgra at cvs dot php dot net
sorry, can't reproduce on linux and solaris

are you sure it happens on Win32 _and_ UNIX ???
 [2000-08-01 05:37 UTC] andi@php.net
Please try the latest CVS version or snapshot (snaps.php.net) and reopen the bug report if this still happens to you. I couldn't reproduce it, neither on Linux nor on Windows NT.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Aug 17 17:05:44 2022 UTC