php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9921 Wrong File Created Date and Wrong Filesize
Submitted: 2001-03-22 09:31 UTC Modified: 2001-03-28 10:17 UTC
From: lopes at noite dot pt Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.0.4 OS: WINNT4
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: lopes at noite dot pt
New email:
PHP Version: OS:

 

 [2001-03-22 09:31 UTC] lopes at noite dot pt
<?php
   $fhandle = opendir(".");
	
   while (false!=($file = readdir($fhandle))) 
   { 
      if ($file != "." && $file != "..") 
      { 	
	 if (!(is_dir($file)))
	 {
	      $fdata = filemtime($file);
	      $fdata = date("d/m/Y",$fdata);
	      $fsize = filesize($file);
    
              printf("%s %s %d\n", $file, $fdata, $fsize);
 
	}

	clearstatcache();
	closedir($fhandle);
      }
   }
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-23 08:13 UTC] sniper@php.net
Can you please add the output of this?
ie. How are the date and size wrong?

--Jani

 [2001-03-26 15:51 UTC] sniper@php.net
There's a duplicate for this: #9993 

Please, update the old bug report, do NOT open new ones!
(from now on, update #9993 !)

--Jani

 [2001-03-28 10:17 UTC] lopes at noite dot pt
Sorry!



The Output for every file (no matter filesize or file date) is :


<filename> 01/01/1970 0


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 15:01:30 2025 UTC