|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8822 readdir doesn't return directories starting with a digit
Submitted: 2001-01-20 16:03 UTC Modified: 2001-01-20 16:28 UTC
From: vahan at design dot am Assigned:
Status: Closed Package: Directory function related
PHP Version: 4.0 Latest CVS (20/01/2001) OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
16 + 38 = ?
Subscribe to this entry?

 [2001-01-20 16:03 UTC] vahan at design dot am
function dir_list($dirname) 
 while ($file = readdir($handle)) 
   if($file=='.'||$file=='..') continue;
 return $result_array; 

executed for a directory which has subdirectory that has a digit/special character as a first character of it's name,
then that subdirectory won't be included in the $result_array


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-20 16:28 UTC]
Your script is wrong.  Use:

while (($file = readdir($handle))!==false)

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jun 15 01:01:24 2021 UTC