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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mclion at obala dot net
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC