You are here: Re: need PHP to read file date in directory « PHP Programming Language « IT news, forums, messages
Re: need PHP to read file date in directory

Posted by JackM on 01/11/07 00:48

JackM wrote:
> NC wrote:
>
>>> Is there a way to use PHP to read the date of a file that is uploaded
>>> into a directory and then print out that date on another page?
>>
>>
>> Yes:
>>
>> echo date('F, n, Y', filemtime('/texts/filename.pdf'));
>
>
> Everything is coming up with a December 12, 1969 date when I use this.
> Any idea why?

Found out why. I had to go up one more level to read the file:
filemtime('./texts/filename.pdf')

But the strange thing is that the file dates are all coming out January
1, 2007 now even when the files were created and/or modified after that
date.

--
My email address on the header is a non-monitored spam catching account.
I can be reached via http://www.wvnh.net/contact.htm

The dates for the next RADP meet (RADP-XII) are October 12-15, 2007,
followed by the 2007 Holiday Meets on December 7-10, 2007.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация