Jump to content

[SOLVED] Regarding filemtime()


xt gohan

Recommended Posts

Hey I've been using this function to determine the latest update file, but I'm not sure why I keep getting this error:

 

Warning: filemtime() [function.filemtime]: stat failed for http1.doc in /home1/theninja/public_html/sitemaster/images.php on line 43

December 31 1969 17:00:00.

 

function lastupdate () {
$updated = scandir("images/scans/miami/", 1);
foreach($updated as $key => $value) {
  if($value == ".." || $value == "." || $value == "error_log") {
	unset($updated[$key]);
  }
}
$page = $updated[0];
echo date("F d Y H:i:s.",filemtime($page));
}

 

Can some please let me know what I am doing wrong with this function? I was trying my hardest to figure it out and I played around with it for a bit too. Basically it's supposed to scan the folders for images and pick out the time for the most recently modified/added.

Link to comment
https://forums.phpfreaks.com/topic/121771-solved-regarding-filemtime/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.