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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: leon at clearink dot com
New email:
PHP Version: OS:

 

 [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 14:01:33 2024 UTC