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 $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 = readdir($handle))) {
> >        echo "&nbsp;&nbsp;$file - Last Modified: " . date("F d Y H:i:s.",
> >filemtime($file)) . "<br>\n";
> >     }
> >    closedir($handle);
> > }
> >?>
> >
> >All the files are coming back with a date of December 31 1969 19:00:00.
What
> >am I doing wrong? The next step is I want to check if the file is older
than
> >30 minutes and if so, I want to delete it. How would I go about that?
> >
> >
> >
> >
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to