View Full Version : Date last modified of a second file
Dufus
02-03-2003, 03:51 PM
I am a newbie to JS, and would appreciate some help. I have looked throughout this site for a way to obtain the date of a specific, second file on the web site and display that date on the current HTML page. I want to be able to display the last date a data file was uploaded to the web site. Can anyone help???
Thanks in advance...
head8k
02-03-2003, 04:08 PM
Hi there
You can't do this on the client side with Javascript I'm afraid. You need to use a server-side language such as ASP or PHP to enable you to access the file system on the webserver. Are either of these languages available to you?
Dufus
02-03-2003, 04:26 PM
We could use PHP...
cg9com
02-03-2003, 06:26 PM
do you mean, just add a date specifying the last time you edited a document? there is a client side solution. (if thats what you would call it) http://javascriptkit.com/script/cut8.shtml
also vbscript supports document.lastmodified (ie)
Dufus
02-03-2003, 07:08 PM
Thanks to both of you for responding. Head8k's quick response put us on the correct trail. We solved the problem with a simple php script:
<?php
echo "<center><B>Sales data was last uploaded from the store on " . date ("F d, Y,", filemtime($Controfile)) . " at " . date ("H:i.",filemtime($Controfile)) . "</B></center>";
?>
Thanks again...
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.