Re: Problem with last modified dates...
| From: | David Robley | Date: | Wed, 21 Jun 2000 01:22:50 +0000 |
| Subject: | Re: Problem with last modified dates... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2422@lists.php.net to get a copy of this message | ||
On 20 Jun, Jay Paulson wrote:
> Hello everyone--
>
> Our company's intranet site has an error in the footer PHP code that causes
> the Last modified date to show up as 1 January 1970, 12:00am GMT. The file
> is included in nearly all of the 40-50 files in the site, which means the
> files are all having the problem! The person who wrote the code parsed out
> the URL to make all parts of the path clickable and then used that parsed
> path as the path to the file. This works most of the time, but the problem
> occurs when
>
> * The URL is only to the directory (ex.
> http://intranet.viatel.com/)
> * The URL has get parameters (ex.
> http://intranet.viatel.com/index.php3?t=42)
>
> I've never run into this problem so any help would be great!
>
> Thanks,
> Jay
You could try building the filename for getting the timestamp using
DOCUMENT_ROOT and PHP_SELF - this should give you a valid filename that
you can feed to filemtime()
Cheers
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA