Jump to content

PHP Date Uploaded


holmedwa04

Recommended Posts

HeyJust a really quick question... is it possible to include the date that a page was last uploaded without having to type it in manually. I know you can display today's date or the users date but what about the date that the file was last uploaded on?Kind RegardsEdward

Link to comment
Share on other sites

Ive managed to scrape together this code from various sources:

<? php print "Gallery Last Modified:" . date ("F jS, Y \a\t H:i:s", getlastmod()); ?>

But it comes up with this error message now when I view that page:

Parse error: syntax error, unexpected T_PRINT in /var/www/vhosts/goathland.co.cc/httpdocs/gallery/buildingbaseboard/index.php on line 27
Link to comment
Share on other sites

getlastmod() is as close as you can get. That, or perhaps filectime()... either way, "upload" is too much of an abstract concept. Depending on how the file was uploaded, its creation and/or modification time may or may not be modified. Experiment, and look at the file functions on the left of those two pages.[edit]You have a space between "<?" and "php". Remove it.[/edit]
Link to comment
Share on other sites

getlastmod() is as close as you can get. That, or perhaps filectime()... either way, "upload" is too much of an abstract concept. Depending on how the file was uploaded, its creation and/or modification time may or may not be modified. Experiment, and look at the file functions on the left of those two pages.[edit]You have a space between "<?" and "php". Remove it.[/edit]
Thanks im kind of new to this, but bit of a silly error on my part there :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...