Re: Mktime formatting problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 11, 2006 3:37 pm, Ryan A wrote:
> So far this is what I have done:
> -----------------------------
> 1) read the files from a directory, discard the files
> with a  .php extention and the directories (eg: . and
> .. )
>
> 2) put the files into an array ($the_files[])
>
> 3) put it into a while loop and display the files like
> so:

//Only do files over 2 hours old:
if ((time() - filectime($dir...[$i])) > 60*60*2){

> echo $the_files[$i] . date("F d Y H:i:s.",
> filectime($directory_with_files.$the_files[$i]));

}

You may need a '/' in there...

> -----------------------------
>
>
> The next step is, I want to only echo the files that
> are over x minutes (or x hours) old, ignore anything
> below, I am using mktime() along with date() to format
> it accordingly...but am unable to do so.
>
>
>
> Can someone kindly give me a quick example on how to
> do this? sitting too long on the comp, I think i'm
> losing it :-(
>
> If you want the php file that i have written please
> tell me and will send it to you offlist.
>
> Thanks!
> Ryan
>
> ------
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
> -----
> Fight back spam! Download the Blue Frog.
> http://www.bluesecurity.com/register/s?user=bXVzaWNndTc%3D
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux