Re: [PHP] File Modification Date/Time

2003-01-05 Thread Marek Kilimajer
This should be right, $TimeDiff is in seconds. Christopher J. Crane wrote: Doyou know how to compare time. I would like to get the difference in time from now to when the file was last accessed. I was thinking something like this: ?PHP $DirToCheck = tempdata/; echo $Nowbrbr\n; $TimeNow =

[PHP] File Modification Date/Time

2003-01-03 Thread Christopher J. Crane
I am trying to parse through a directory and get the modification dates of the file. ?PHP $DirToCheck = tempdata/; if ($handle = opendir($DirToCheck)) { while (false !== ($file = readdir($handle))) { echo nbsp;nbsp;$file - Last Modified: . date(F d Y H:i:s., filemtime($file)) . br\n;

Re: [PHP] File Modification Date/Time

2003-01-03 Thread Marek Kilimajer
you must prepend $DirToCheck to $file: filemtime($DirToCheck . $file) Christopher J. Crane wrote: I am trying to parse through a directory and get the modification dates of the file. ?PHP $DirToCheck = tempdata/; if ($handle = opendir($DirToCheck)) { while (false !== ($file =

Re: [PHP] File Modification Date/Time

2003-01-03 Thread Christopher J. Crane
Oh that would make sense. I was think ahead. I thought the file was loaded into an array and I was like foreach in the array. So simple, I didn't see it. Thank you! Marek Kilimajer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... you must prepend $DirToCheck to

Re: [PHP] File Modification Date/Time

2003-01-03 Thread Christopher J. Crane
Doyou know how to compare time. I would like to get the difference in time from now to when the file was last accessed. I was thinking something like this: ?PHP $DirToCheck = tempdata/; echo $Nowbrbr\n; $TimeNow = time(); if ($handle = opendir($DirToCheck)) { while (false !== ($file =