holmedwa04 Posted June 6, 2010 Share Posted June 6, 2010 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 More sharing options...
holmedwa04 Posted June 6, 2010 Author Share Posted June 6, 2010 Sorry to be impatient... its just I can't find an answer anywhere and I really need to know how to do it if its possible. Plus no one has replied which makes me think it might not be possible Link to comment Share on other sites More sharing options...
holmedwa04 Posted June 6, 2010 Author Share Posted June 6, 2010 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 More sharing options...
boen_robot Posted June 6, 2010 Share Posted June 6, 2010 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 More sharing options...
holmedwa04 Posted June 6, 2010 Author Share Posted June 6, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.