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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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: Sun Dec 22 07:01:30 2024 UTC