php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #565 Rewinddir not rewinding
Submitted: 1998-07-21 17:55 UTC Modified: 1998-07-21 18:39 UTC
From: leon at clearink dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.1 OS: Windows NT
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:
MUST BE VALID
Solve the problem:
41 + 17 = ?
Subscribe to this entry?

 
 [1998-07-21 17:55 UTC] leon at clearink dot com
This bug actually has existed from RC4 through 3.0.2.  It only happens in the Windows version.  
It works fine on our Solaris box. 

This script should print a table.  The first row has all the files, the second has the file size.

<?
	print("<TABLE BORDER=\"1\">\n");

	$myDirectory = opendir(".");

	print("<TR>\n");
	print("<TH>Filename</TH>\n");

	while($entryName = readdir($myDirectory))
	{
		print("<TD>$entryName</TD>\n");
	}

	print("</TR>\n");

	rewinddir($myDirectory);

	print("<TR>\n");
	print("<TH>Size</TH>\n");

	while($entryName = readdir($myDirectory))
	{
		print("<TD>" . filesize($entryName) . "</TD>\n");
	}

	print("</TR>\n");
	
	closedir($myDirectory);

	print("</TABLE>\n");
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-07-21 18:39 UTC] zeev
The Win32 compatability code for rewinddir() wasn't complete.
Fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 14 06:01:35 2024 UTC