|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6767 filemtime not working
Submitted: 2000-09-15 01:00 UTC Modified: 2001-01-08 15:48 UTC
From: carlos at softsalsa dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.2 OS: W98
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:
37 - 34 = ?
Subscribe to this entry?

 [2000-09-15 01:00 UTC] carlos at softsalsa dot com
while (($file = readdir($handle))!==false) {
	$filedate = date("d-m-Y H:i:s",filemtime($file));
	echo $filedate."<br>";

filemtime returns 0 for all files on a directory except for . and ..


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-08 15:48 UTC]
can you check whether this still errs with 4.0.4 or latest CVS? if so, reopen this bug report.
it works for me(TM) with today's CVS mod_php4 on NT5.
 [2002-01-12 23:16 UTC] ken dot gregg at rwre dot com
OS FreeBSD 4.0 php 4.06

This code works fine if you use '.' for the dir. But if you
use './somesubdir' filemtime always returns false. Could it be looking for the filename string in the current dir regarless of the filename passed?
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 23:01:31 2024 UTC